Class: Mocha::InstanceMethod
- Inherits:
-
ClassMethod
- Object
- ClassMethod
- Mocha::InstanceMethod
- Defined in:
- lib/mocha/instance_method.rb
Instance Attribute Summary
Attributes inherited from ClassMethod
Instance Method Summary collapse
Methods inherited from ClassMethod
#define_new_method, #eql?, #hidden_method, #hide_original_method, #initialize, #mock, #remove_new_method, #restore_original_method, #stub, #to_s, #unstub
Constructor Details
This class inherits a constructor from Mocha::ClassMethod
Instance Method Details
#method_exists?(method) ⇒ Boolean
7 8 9 10 11 12 |
# File 'lib/mocha/instance_method.rb', line 7 def method_exists?(method) return true if stubbee.public_methods(false).include?(method) return true if stubbee.protected_methods(false).include?(method) return true if stubbee.private_methods(false).include?(method) return false end |