Module: RR::ClassInstanceMethodDefined
- Included in:
- Injections::DoubleInjection, Injections::Injection, Injections::MethodMissingInjection, Injections::SingletonMethodAddedInjection
- Defined in:
- lib/rr/class_instance_method_defined.rb
Instance Method Summary collapse
Instance Method Details
#class_instance_method_defined(klass, instance_method, include_super = true) ⇒ Object
3 4 5 6 7 |
# File 'lib/rr/class_instance_method_defined.rb', line 3 def class_instance_method_defined(klass, instance_method, include_super=true) klass.instance_methods(include_super).detect {|method_name| method_name.to_sym == instance_method.to_sym} || klass.protected_instance_methods(include_super).detect {|method_name| method_name.to_sym == instance_method.to_sym} || klass.private_instance_methods(include_super).detect {|method_name| method_name.to_sym == instance_method.to_sym} end |