Class: WorkflowTemplate::State::Meta
- Inherits:
-
Object
- Object
- WorkflowTemplate::State::Meta
- Defined in:
- lib/workflow_template/state/meta.rb
Defined Under Namespace
Modules: Null
Instance Attribute Summary collapse
-
#trace ⇒ Object
readonly
Returns the value of attribute trace.
Class Method Summary collapse
Instance Method Summary collapse
- #add(name) ⇒ Object
-
#initialize(trace: []) ⇒ Meta
constructor
A new instance of Meta.
Constructor Details
#initialize(trace: []) ⇒ Meta
Returns a new instance of Meta.
26 27 28 |
# File 'lib/workflow_template/state/meta.rb', line 26 def initialize(trace: []) @trace = trace.freeze end |
Instance Attribute Details
#trace ⇒ Object (readonly)
Returns the value of attribute trace.
18 19 20 |
# File 'lib/workflow_template/state/meta.rb', line 18 def trace @trace end |
Class Method Details
.instance(trace) ⇒ Object
20 21 22 |
# File 'lib/workflow_template/state/meta.rb', line 20 def self.instance(trace) trace ? new : Null end |
Instance Method Details
#add(name) ⇒ Object
30 31 32 |
# File 'lib/workflow_template/state/meta.rb', line 30 def add(name) self.class.send :new, trace: [*@trace, name] end |