Class: Axn::InternalContext
- Inherits:
-
ContextFacade
- Object
- ContextFacade
- Axn::InternalContext
- Defined in:
- lib/axn/core/context/internal.rb
Overview
Inbound / Internal ContextFacade
Instance Attribute Summary
Attributes inherited from ContextFacade
Instance Method Summary collapse
Methods inherited from ContextFacade
Constructor Details
This class inherits a constructor from Axn::ContextFacade
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name) ⇒ Object (private)
rubocop:disable Style/MissingRespondToMissing (because we’re not actually responding to anything additional)
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/axn/core/context/internal.rb', line 15 def method_missing(method_name, ...) # rubocop:disable Style/MissingRespondToMissing (because we're not actually responding to anything additional) if @context.__combined_data.key?(method_name.to_sym) msg = <<~MSG Method ##{method_name} is not available on Axn::InternalContext! #{action_name} may be missing a line like: expects :#{method_name} MSG raise Axn::ContractViolation::MethodNotAllowed, msg end super end |
Instance Method Details
#default_error ⇒ Object
8 |
# File 'lib/axn/core/context/internal.rb', line 8 def default_error = _msg_resolver(:error, exception: Axn::Failure.new). |
#default_success ⇒ Object
9 |
# File 'lib/axn/core/context/internal.rb', line 9 def default_success = _msg_resolver(:success, exception: nil). |