class RSpec::Mocks::ObjectMethodReference
@private
Public Class Methods
Source
# File lib/rspec/mocks/method_reference.rb, line 150 def self.for(object_reference, method_name) if ClassNewMethodReference.applies_to?(method_name) { object_reference.when_loaded { |o| o } } ClassNewMethodReference.new(object_reference, method_name) else super end end
Calls superclass method
RSpec::Mocks::MethodReference::for
Private Instance Methods
Source
# File lib/rspec/mocks/method_reference.rb, line 168 def find_method(object) object.method(@method_name) end
Source
# File lib/rspec/mocks/method_reference.rb, line 164 def method_defined?(object) (class << object; self; end).method_defined?(@method_name) end
Source
# File lib/rspec/mocks/method_reference.rb, line 160 def method_implemented?(object) object.respond_to?(@method_name, true) end
Source
# File lib/rspec/mocks/method_reference.rb, line 172 def visibility_from(object) MethodReference.method_visibility_for(object, @method_name) end