Class: RSpec::Mocks::AndInvokeImplementation Private
Relationships & Source Files | |
Inherits: | Object |
Defined in: | rspec-mocks/lib/rspec/mocks/message_expectation.rb |
Overview
Handles the implementation of an and_invoke
implementation.
Other Constraints
- #call(*args, &block) Internal use only
- .new(procs_to_invoke) ⇒ AndInvokeImplementation constructor Internal use only
Constructor Details
.new(procs_to_invoke) ⇒ AndInvokeImplementation
# File 'rspec-mocks/lib/rspec/mocks/message_expectation.rb', line 738
def initialize(procs_to_invoke) @procs_to_invoke = procs_to_invoke end
Instance Method Details
#call(*args, &block)
[ GitHub ]# File 'rspec-mocks/lib/rspec/mocks/message_expectation.rb', line 742
def call(*args, &block) proc = if @procs_to_invoke.size > 1 @procs_to_invoke.shift else @procs_to_invoke.first end proc.call(*args, &block) end