Class: RSpec::Mocks::Matchers::ExpectationCustomization

Inherits:
Object
  • Object
show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/matchers/expectation_customization.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(method_name, args, block) ⇒ ExpectationCustomization

Returns a new instance of ExpectationCustomization.



8
9
10
11
12
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/matchers/expectation_customization.rb', line 8

def initialize(method_name, args, block)
  @method_name = method_name
  @args        = args
  @block       = block
end

Instance Attribute Details

#blockObject

Returns the value of attribute block.



6
7
8
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/matchers/expectation_customization.rb', line 6

def block
  @block
end

Instance Method Details

#playback_onto(expectation) ⇒ Object



14
15
16
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/matchers/expectation_customization.rb', line 14

def playback_onto(expectation)
  expectation.__send__(@method_name, *@args, &@block)
end