123456789_123456789_123456789_123456789_123456789_

Class: RSpec::Mocks::InstanceMethodReference Private

Do not use. This class is for internal use only.
Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: RSpec::Mocks::MethodReference
Defined in: rspec-mocks/lib/rspec/mocks/method_reference.rb

Class Method Summary

Instance Attribute Summary

MethodReference - Inherited

#defined?

A method is defined if we are able to get a Method object for it.

#implemented?

A method is implemented if sending the message does not result in a NoMethodError.

#unimplemented?

Returns true if we definitively know that sending the method will result in a NoMethodError.

Instance Method Summary

MethodReference - Inherited

Instance Method Details

#find_method(mod) (private)

See additional method definition at line 134.

[ GitHub ]

  
# File 'rspec-mocks/lib/rspec/mocks/method_reference.rb', line 138

def find_method(mod)
  mod.dup.instance_method(@method_name)
end

#method_defined?(mod) (private)

[ GitHub ]

  
# File 'rspec-mocks/lib/rspec/mocks/method_reference.rb', line 125

alias method_defined? method_implemented?

#method_implemented?(mod) ⇒ Boolean (private) Also known as: #method_defined?

[ GitHub ]

  
# File 'rspec-mocks/lib/rspec/mocks/method_reference.rb', line 116

def method_implemented?(mod)
  MethodReference.method_defined_at_any_visibility?(mod, @method_name)
end

#visibility_from(mod) (private)

[ GitHub ]

  
# File 'rspec-mocks/lib/rspec/mocks/method_reference.rb', line 143

def visibility_from(mod)
  MethodReference.instance_method_visibility_for(mod, @method_name)
end