Is instance method defined : method_defined « Reflection « Ruby
- Ruby
- Reflection
- method_defined
Is instance method defined
class MyClass
def MyClass.my_singleton_method
end
def my_instance_method
end
end
p MyClass.method_defined? :my_instance_method # => true
Related examples in the same category