Ruby metaprogramming: cannot send a method to a module
问题 For example I have following custom class and module: module SimpleModule def hello_world puts 'i am a SimpleModule method' end def self.class_hello_world puts 'i am a SimpleModule class method' end end class SimpleClass def hello_world puts 'i am SimpleClass method' end def self.class_hello_world puts 'i am a SimpleClass class method' end end I tried to called those methods inside class and module by using method send SimpleClass.send(class_hello_world) # work SimpleClass.new.send(hello