Class: WhyChain::DispatchTrace
- Inherits:
-
Object
- Object
- WhyChain::DispatchTrace
- Defined in:
- lib/why_chain/dispatch_trace.rb
Overview
Immutable value object for traced dispatch data.
Instance Attribute Summary collapse
-
#lookup_chain ⇒ Object
readonly
Returns the value of attribute lookup_chain.
-
#next_super_owner ⇒ Object
readonly
Returns the value of attribute next_super_owner.
-
#owner ⇒ Object
readonly
Returns the value of attribute owner.
Instance Method Summary collapse
-
#initialize(lookup_chain:, owner:, next_super_owner:) ⇒ DispatchTrace
constructor
A new instance of DispatchTrace.
- #to_h ⇒ Object
Constructor Details
#initialize(lookup_chain:, owner:, next_super_owner:) ⇒ DispatchTrace
Returns a new instance of DispatchTrace.
8 9 10 11 12 13 14 15 16 |
# File 'lib/why_chain/dispatch_trace.rb', line 8 def initialize( lookup_chain:, owner:, next_super_owner: ) @lookup_chain = lookup_chain @owner = owner @next_super_owner = next_super_owner end |
Instance Attribute Details
#lookup_chain ⇒ Object (readonly)
Returns the value of attribute lookup_chain.
6 7 8 |
# File 'lib/why_chain/dispatch_trace.rb', line 6 def lookup_chain @lookup_chain end |
#next_super_owner ⇒ Object (readonly)
Returns the value of attribute next_super_owner.
6 7 8 |
# File 'lib/why_chain/dispatch_trace.rb', line 6 def next_super_owner @next_super_owner end |
#owner ⇒ Object (readonly)
Returns the value of attribute owner.
6 7 8 |
# File 'lib/why_chain/dispatch_trace.rb', line 6 def owner @owner end |
Instance Method Details
#to_h ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/why_chain/dispatch_trace.rb', line 18 def to_h { lookup_chain: lookup_chain, owner: owner, next_super_owner: next_super_owner } end |