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 816 def initialize(method, block) @method = method @block = block end
Public Instance Methods
Source
# File lib/rspec/mocks/message_expectation.rb, line 843 def call(*args, &block) @block.call(@method, *args, &block) end
Source
# File lib/rspec/mocks/message_expectation.rb, line 823 def initial_action=(_value) raise cannot_modify_further_error end
Source
# File lib/rspec/mocks/message_expectation.rb, line 839 def inner_action true end
Source
# File lib/rspec/mocks/message_expectation.rb, line 827 def inner_action=(_value) raise cannot_modify_further_error end
Source
# File lib/rspec/mocks/message_expectation.rb, line 831 def terminal_action=(_value) raise cannot_modify_further_error end
Private Instance Methods
Source
# File lib/rspec/mocks/message_expectation.rb, line 850 def cannot_modify_further_error CannotModifyFurtherError.new "This method has already been configured " \ "to call the original implementation, and cannot be modified further." end