Hi, I know that I can extend a Class instance (an object) with a
method(s) by doing:

  object.extend Module

but can I do it in a "inline" way without the need of a module?
I just want something as follows:

  time = Time.now
  object.add_method 'def say_time(); return time; end'

  irb> object.say_time
  --> time

Note that I **don't** want to include the "add_method" in object class
or in Object class. This is, I don't want to "dirty" object class.

Also note that I can't use "object.extend Module" since the method
"say_time" must return a variable "time" value that I pass as an
argument.

Is there some way? Thanks a lot.


-- 
IƱaki Baz Castillo
<ibc / aliax.net>