Class: RSpec::Mocks::AndWrapOriginalImplementation
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/message_expectation.rb
Overview
Represents an ‘and_call_original` implementation.
Other Constraints collapse
- CannotModifyFurtherError =
Class.new(StandardError)
Other Constraints collapse
- #call(*args, &block) ⇒ Object
- #initial_action=(_value) ⇒ Object
-
#initialize(method, block) ⇒ AndWrapOriginalImplementation
constructor
A new instance of AndWrapOriginalImplementation.
- #inner_action ⇒ Object
- #inner_action=(_value) ⇒ Object
- #present? ⇒ Boolean
- #terminal_action=(_value) ⇒ Object
Constructor Details
#initialize(method, block) ⇒ AndWrapOriginalImplementation
Returns a new instance of AndWrapOriginalImplementation.
780 781 782 783 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/message_expectation.rb', line 780 def initialize(method, block) @method = method @block = block end |
Instance Method Details
#call(*args, &block) ⇒ Object
807 808 809 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/message_expectation.rb', line 807 def call(*args, &block) @block.call(@method, *args, &block) end |
#initial_action=(_value) ⇒ Object
787 788 789 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/message_expectation.rb', line 787 def initial_action=(_value) raise cannot_modify_further_error end |
#inner_action ⇒ Object
803 804 805 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/message_expectation.rb', line 803 def inner_action true end |
#inner_action=(_value) ⇒ Object
791 792 793 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/message_expectation.rb', line 791 def inner_action=(_value) raise cannot_modify_further_error end |
#present? ⇒ Boolean
799 800 801 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/message_expectation.rb', line 799 def present? true end |
#terminal_action=(_value) ⇒ Object
795 796 797 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/message_expectation.rb', line 795 def terminal_action=(_value) raise cannot_modify_further_error end |