Class: NucleusCore::Workflow::Process
- Inherits:
-
Object
- Object
- NucleusCore::Workflow::Process
- Defined in:
- lib/nucleus_core/workflow.rb
Instance Attribute Summary collapse
-
#state ⇒ Object
Returns the value of attribute state.
-
#visited ⇒ Object
Returns the value of attribute visited.
Instance Method Summary collapse
-
#initialize(state) ⇒ Process
constructor
A new instance of Process.
- #visit(state) ⇒ Object
Constructor Details
#initialize(state) ⇒ Process
Returns a new instance of Process.
20 21 22 23 |
# File 'lib/nucleus_core/workflow.rb', line 20 def initialize(state) @state = state @visited = [] end |
Instance Attribute Details
#state ⇒ Object
Returns the value of attribute state.
18 19 20 |
# File 'lib/nucleus_core/workflow.rb', line 18 def state @state end |
#visited ⇒ Object
Returns the value of attribute visited.
18 19 20 |
# File 'lib/nucleus_core/workflow.rb', line 18 def visited @visited end |
Instance Method Details
#visit(state) ⇒ Object
25 26 27 28 |
# File 'lib/nucleus_core/workflow.rb', line 25 def visit(state) @state = state @visited.push(state) end |