J
jonT
Hi,
I'd like to be able to do the following:
class Method; attr_accessor :foo; end
def bar; "some_res"; end
methodbar).foo=1
methodbar).foo #= 1
Of coures what i'd actually get is:
methodbar).foo #= nil
because methodbar) returns a new object each time.
Is it possible to bind properties to a method definition? If so, how?
Thanks,
Jon
I'd like to be able to do the following:
class Method; attr_accessor :foo; end
def bar; "some_res"; end
methodbar).foo=1
methodbar).foo #= 1
Of coures what i'd actually get is:
methodbar).foo #= nil
because methodbar) returns a new object each time.
Is it possible to bind properties to a method definition? If so, how?
Thanks,
Jon