Check respond_to? for new added instance method : respond_to « Reflection « Ruby
- Ruby
- Reflection
- respond_to
Check respond_to? for new added instance method
class MyClass
def MyClass.my_singleton_method
end
def my_instance_method
end
end
p MyClass.respond_to? :my_instance_method # => false
Related examples in the same category