class RSpec::Mocks::AndWrapOriginalImplementation
Represents an ‘and_call_original` implementation. @private
Constants
- CannotModifyFurtherError
Public Class Methods
Source
# File lib/rspec/mocks/message_expectation.rb, line 781 def initialize(method, block) @method = method @block = block end
Public Instance Methods
Source
# File lib/rspec/mocks/message_expectation.rb, line 808 def call(*args, &block) @block.call(@method, *args, &block) end
Source
# File lib/rspec/mocks/message_expectation.rb, line 788 def initial_action=(_value) raise cannot_modify_further_error end
Source
# File lib/rspec/mocks/message_expectation.rb, line 804 def inner_action true end
Source
# File lib/rspec/mocks/message_expectation.rb, line 792 def inner_action=(_value) raise cannot_modify_further_error end
Source
# File lib/rspec/mocks/message_expectation.rb, line 796 def terminal_action=(_value) raise cannot_modify_further_error end
Private Instance Methods
Source
# File lib/rspec/mocks/message_expectation.rb, line 815 def cannot_modify_further_error CannotModifyFurtherError.new "This method has already been configured " \ "to call the original implementation, and cannot be modified further." end