Class: OpenLoam::Workflow::Definition

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

Overview

The whole machine, frozen at class-definition time.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#column ⇒ Object

Returns the value of attribute column

Returns:

  • (Object) —

    the current value of column



39
40
41
# File 'lib/open_loam/workflow.rb', line 39

def column
  @column
end

#initial ⇒ Object

Returns the value of attribute initial

Returns:

  • (Object) —

    the current value of initial



39
40
41
# File 'lib/open_loam/workflow.rb', line 39

def initial
  @initial
end

#states ⇒ Object

Returns the value of attribute states

Returns:

  • (Object) —

    the current value of states



39
40
41
# File 'lib/open_loam/workflow.rb', line 39

def states
  @states
end

#transitions ⇒ Object

Returns the value of attribute transitions

Returns:

  • (Object) —

    the current value of transitions



39
40
41
# File 'lib/open_loam/workflow.rb', line 39

def transitions
  @transitions
end

Instance Method Details

#transitions_from(state) ⇒ Object



40
41
42
# File 'lib/open_loam/workflow.rb', line 40

def transitions_from(state)
  transitions.each_value.select { |transition| transition.from.include?(state.to_s) }
end