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.
105 106 107 |
# File 'lib/workflow.rb', line 105 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.
103 104 105 |
# File 'lib/workflow.rb', line 103 def action @action end |
#meta ⇒ Object
Returns the value of attribute meta.
103 104 105 |
# File 'lib/workflow.rb', line 103 def end |
#name ⇒ Object
Returns the value of attribute name.
103 104 105 |
# File 'lib/workflow.rb', line 103 def name @name end |
#transitions_to ⇒ Object
Returns the value of attribute transitions_to.
103 104 105 |
# File 'lib/workflow.rb', line 103 def transitions_to @transitions_to end |
Instance Method Details
#perform_validation? ⇒ Boolean
109 110 111 |
# File 'lib/workflow.rb', line 109 def perform_validation? !self.[:skip_all_validations] end |
#to_s ⇒ Object
117 118 119 |
# File 'lib/workflow.rb', line 117 def to_s @name.to_s end |
#to_sym ⇒ Object
113 114 115 |
# File 'lib/workflow.rb', line 113 def to_sym @name.to_sym end |