M
Marc Heiler
Before someone showed me
methodputs).class
I thought methods are no objects.
But class Method seems to exist, with
Method.class giving back Class,
so
Method.class.new
would be the same as
Class.new
I guess one can extend every Class.new via
instance_eval, but my problem here fundamentally is,
why is a method an object? And if I can create a
new object from any method...
What I now see is that every object in ruby has methods,
which are objects as well. Did I make a mistake? Are methods
no objects? Or why are methods objects too?
methodputs).class
I thought methods are no objects.
But class Method seems to exist, with
Method.class giving back Class,
so
Method.class.new
would be the same as
Class.new
I guess one can extend every Class.new via
instance_eval, but my problem here fundamentally is,
why is a method an object? And if I can create a
new object from any method...
What I now see is that every object in ruby has methods,
which are objects as well. Did I make a mistake? Are methods
no objects? Or why are methods objects too?