Class: WhyChain::DispatchStep
- Inherits:
-
Object
- Object
- WhyChain::DispatchStep
- Defined in:
- lib/why_chain/dispatch_step.rb
Overview
Immutable value object for a single dispatch step.
Instance Attribute Summary collapse
-
#owner ⇒ Object
readonly
Returns the value of attribute owner.
-
#source_location ⇒ Object
readonly
Returns the value of attribute source_location.
Instance Method Summary collapse
-
#initialize(owner:, source_location:) ⇒ DispatchStep
constructor
A new instance of DispatchStep.
- #to_h ⇒ Object
Constructor Details
#initialize(owner:, source_location:) ⇒ DispatchStep
Returns a new instance of DispatchStep.
8 9 10 11 |
# File 'lib/why_chain/dispatch_step.rb', line 8 def initialize(owner:, source_location:) @owner = owner @source_location = source_location end |
Instance Attribute Details
#owner ⇒ Object (readonly)
Returns the value of attribute owner.
6 7 8 |
# File 'lib/why_chain/dispatch_step.rb', line 6 def owner @owner end |
#source_location ⇒ Object (readonly)
Returns the value of attribute source_location.
6 7 8 |
# File 'lib/why_chain/dispatch_step.rb', line 6 def source_location @source_location end |
Instance Method Details
#to_h ⇒ Object
13 14 15 16 17 18 |
# File 'lib/why_chain/dispatch_step.rb', line 13 def to_h { owner: owner, source_location: source_location } end |