class RSpec::Mocks::AndCallOriginalImplementation

Represents an `and_call_original` implementation. @private

Constants

CannotModifyFurtherError

Public Class Methods

new(method) click to toggle source
# File lib/rspec/mocks/message_expectation.rb, line 545
def initialize(method)
  @method = method
end

Public Instance Methods

arity() click to toggle source
# File lib/rspec/mocks/message_expectation.rb, line 551
def arity
  @method.arity
end
call(*args, &block) click to toggle source
# File lib/rspec/mocks/message_expectation.rb, line 571
def call(*args, &block)
  @method.call(*args, &block)
end
initial_action=(value) click to toggle source
# File lib/rspec/mocks/message_expectation.rb, line 555
def initial_action=(value)
  raise cannot_modify_further_error
end
inner_action=(value) click to toggle source
# File lib/rspec/mocks/message_expectation.rb, line 559
def inner_action=(value)
  raise cannot_modify_further_error
end
present?() click to toggle source
# File lib/rspec/mocks/message_expectation.rb, line 567
def present?
  true
end
terminal_action=(value) click to toggle source
# File lib/rspec/mocks/message_expectation.rb, line 563
def terminal_action=(value)
  raise cannot_modify_further_error
end

Private Instance Methods

cannot_modify_further_error() click to toggle source
# File lib/rspec/mocks/message_expectation.rb, line 577
def cannot_modify_further_error
  CannotModifyFurtherError.new "This method has already been configured " +
    "to call the original implementation, and cannot be modified further."
end