- or download this
{
package My::Class;
...
print $obj_1->foo; # print "Foo"
print $obj_2->foo; # dies with a method not found error
- or download this
class << obj
def new_method
"fweeee"
end
end
- or download this
obj.add_singleton_method(lambda { "fweee" })