From: "trans. (T. Onoma)" Date: 2004-11-19T15:10:11+09:00 Subject: Re: Delegating a method, with arguments On Friday 19 November 2004 12:48 am, Daniel Berger wrote: | 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 Not sure I understand, but is this what you are trying to do? require "forwardable" class Foo < String extend Forwardable def directory? FileTest.directory?(@path) end def initialize(path) @path = path end end ? T.