From: djberg96@... (Daniel Berger) Date: 2004-11-19T14:48:12+09:00 Subject: Delegating a method, with arguments Hi all, I'm trying to write a class where I want to delegate some instance methods as FileTest class methods. For example: require "forwardable" class Foo < String extend Forwardable def_delegator(:FileTest,:directory?) def initialize(path) @path = path end end This doesn't work, however, since FileTest.directory? requires an argument. What I would like is something like the following fictional syntax: def_delegator(:FileTest,:directory?(@path)) I don't want to create an instance of File and delegate to that instance because I don't know if @path will actually be valid or not (among other reasons). So, would something like this be possible? Regards, Dan