Class: NucleusCore::Workflow::Process

Inherits:
Object
  • Object
show all
Defined in:
lib/nucleus_core/workflow.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#stateObject

Returns the value of attribute state.



18
19
20
# File 'lib/nucleus_core/workflow.rb', line 18

def state
  @state
end

#visitedObject

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