Class: SmartCore::Operation::Result::Error::Context
- Inherits:
-
Object
- Object
- SmartCore::Operation::Result::Error::Context
- Defined in:
- lib/smart_core/operation/result/error/context.rb
Overview
Constant Summary collapse
- EMPTY_CONTEXT =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
{}.freeze
Instance Attribute Summary collapse
- #context ⇒ Hash, Any readonly private
Instance Method Summary collapse
- #initialize(context = EMPTY_CONTEXT.dup) ⇒ void constructor private
- #to_h ⇒ Object (also: #data)
Constructor Details
#initialize(context = EMPTY_CONTEXT.dup) ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
23 24 25 |
# File 'lib/smart_core/operation/result/error/context.rb', line 23 def initialize(context = EMPTY_CONTEXT.dup) @context = context end |
Instance Attribute Details
#context ⇒ Hash, Any (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
16 17 18 |
# File 'lib/smart_core/operation/result/error/context.rb', line 16 def context @context end |
Instance Method Details
#to_h ⇒ Object Also known as: data
31 32 33 |
# File 'lib/smart_core/operation/result/error/context.rb', line 31 def to_h context.to_h end |