Class: Workflow::State

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, meta = {}) ⇒ State

Returns a new instance of State.



74
75
76
# File 'lib/workflow.rb', line 74

def initialize(name, meta = {})
  @name, @events, @meta = name, Hash.new, meta
end

Instance Attribute Details

#eventsObject

Returns the value of attribute events.



72
73
74
# File 'lib/workflow.rb', line 72

def events
  @events
end

#metaObject

Returns the value of attribute meta.



72
73
74
# File 'lib/workflow.rb', line 72

def meta
  @meta
end

#nameObject

Returns the value of attribute name.



72
73
74
# File 'lib/workflow.rb', line 72

def name
  @name
end

#on_entryObject

Returns the value of attribute on_entry.



72
73
74
# File 'lib/workflow.rb', line 72

def on_entry
  @on_entry
end

#on_exitObject

Returns the value of attribute on_exit.



72
73
74
# File 'lib/workflow.rb', line 72

def on_exit
  @on_exit
end

Instance Method Details

#to_sObject



78
79
80
# File 'lib/workflow.rb', line 78

def to_s
  "#{name}"
end

#to_symObject



82
83
84
# File 'lib/workflow.rb', line 82

def to_sym
  name.to_sym
end