Class: RSpec::Mocks::Matchers::Receive::Customization

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/mocks/matchers/receive.rb

Instance Method Summary (collapse)

Constructor Details

- (Customization) initialize(method_name, args, block)

A new instance of Customization

83
84
85
86
87
# File 'lib/rspec/mocks/matchers/receive.rb', line 83
def initialize(method_name, args, block)
  @method_name = method_name
  @args        = args
  @block       = block
end

Instance Method Details

- (Object) playback_onto(expectation)

89
90
91
# File 'lib/rspec/mocks/matchers/receive.rb', line 89
def playback_onto(expectation)
  expectation.__send__(@method_name, *@args, &@block)
end