Class: Workflow::Event
- Inherits:
-
Object
- Object
- Workflow::Event
- Defined in:
- lib/workflow.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#meta ⇒ Object
Returns the value of attribute meta.
-
#name ⇒ Object
Returns the value of attribute name.
-
#transitions_to ⇒ Object
Returns the value of attribute transitions_to.
Instance Method Summary collapse
-
#initialize(name, transitions_to, meta = {}, &action) ⇒ Event
constructor
A new instance of Event.
- #perform_validation? ⇒ Boolean
- #to_s ⇒ Object
- #to_sym ⇒ Object
Constructor Details
#initialize(name, transitions_to, meta = {}, &action) ⇒ Event
Returns a new instance of Event.
110 111 112 |
# File 'lib/workflow.rb', line 110 def initialize(name, transitions_to, = {}, &action) @name, @transitions_to, , @action = name, transitions_to.to_sym, , action end |
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action.
108 109 110 |
# File 'lib/workflow.rb', line 108 def action @action end |
#meta ⇒ Object
Returns the value of attribute meta.
108 109 110 |
# File 'lib/workflow.rb', line 108 def end |
#name ⇒ Object
Returns the value of attribute name.
108 109 110 |
# File 'lib/workflow.rb', line 108 def name @name end |
#transitions_to ⇒ Object
Returns the value of attribute transitions_to.
108 109 110 |
# File 'lib/workflow.rb', line 108 def transitions_to @transitions_to end |
Instance Method Details
#perform_validation? ⇒ Boolean
114 115 116 |
# File 'lib/workflow.rb', line 114 def perform_validation? !self.[:skip_all_validations] end |
#to_s ⇒ Object
122 123 124 |
# File 'lib/workflow.rb', line 122 def to_s @name.to_s end |
#to_sym ⇒ Object
118 119 120 |
# File 'lib/workflow.rb', line 118 def to_sym @name.to_sym end |