Class: RSpec::Mocks::ObjectMethodReference

Inherits:
MethodReference show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/method_reference.rb

Direct Known Subclasses

ClassNewMethodReference

Class Method Summary collapse

Methods inherited from MethodReference

#defined?, #implemented?, #initialize, instance_method_visibility_for, method_visibility_for, #unimplemented?, #visibility, #with_signature

Constructor Details

This class inherits a constructor from RSpec::Mocks::MethodReference

Class Method Details

.for(object_reference, method_name) ⇒ Object



150
151
152
153
154
155
156
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/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