Get included method names
How I can get all instance method names in the baz method call, which are only present in the Bar module (without other instance methods of this class) ?
class F开发者_如何学Coo
include Bar
def a
end
def b
end
def baz
#HERE
end
end
class Foo
include Bar
def a
end
def b()
end
def baz
Bar.instance_methods(false)
end
end
puts Foo.new.baz
精彩评论