class RSpec::Mocks::Implementation

Represents a configured implementation. Takes into account any number of sub-implementations. @private

Attributes

initial_action[RW]
inner_action[RW]
terminal_action[RW]

Public Instance Methods

call(*args, &block) click to toggle source
# File lib/rspec/mocks/message_expectation.rb, line 658
def call(*args, &block)
  actions.map do |action|
    action.call(*args, &block)
  end.last
end
present?() click to toggle source
# File lib/rspec/mocks/message_expectation.rb, line 664
def present?
  actions.any?
end

Private Instance Methods

actions() click to toggle source
# File lib/rspec/mocks/message_expectation.rb, line 670
def actions
  [initial_action, inner_action, terminal_action].compact
end