Jest to przydatne, jeśli starają się stworzyć metody klasy metaprogramatically:Jak używać metody define_method do tworzenia metod klas?
def self.create_methods(method_name)
# To create instance methods:
define_method method_name do
...
end
# To create class methods that refer to the args on create_methods:
???
end
Moja odpowiedź do naśladowania ...
Potwierdzona praca w 1.9.2p0 – bloudermilk
także 'singleton_class.define_method' – Pyro