我对method_added(method)的调用方式和时间感到困惑。
如果我有
class Car
def method_added(method)
puts 'method added called'
super
end
def one
puts 'one method'
end
def two
puts 'two method'
end
end
Car.new.one
为什么这不起作用?
我对method_added(method)的调用方式和时间感到困惑。
如果我有
class Car
def method_added(method)
puts 'method added called'
super
end
def one
puts 'one method'
end
def two
puts 'two method'
end
end
Car.new.one
为什么这不起作用?