Class: Oujoke::Workflow::Transition
- Inherits:
-
Object
- Object
- Oujoke::Workflow::Transition
- Defined in:
- lib/workflow/transition.rb
Direct Known Subclasses
ApproveTransition, ForwardTransition, MarkPaidTransition, RejectTransition, RevokeTransition, SerialApproveTransition
Instance Attribute Summary collapse
-
#from_state ⇒ Object
Returns the value of attribute from_state.
-
#name ⇒ Object
Returns the value of attribute name.
-
#on_raise ⇒ Object
Returns the value of attribute on_raise.
-
#params ⇒ Object
Returns the value of attribute params.
-
#to_state ⇒ Object
Returns the value of attribute to_state.
-
#workflow ⇒ Object
Returns the value of attribute workflow.
Instance Method Summary collapse
-
#initialize(bp, options = {}) ⇒ Transition
constructor
A new instance of Transition.
- #perform ⇒ Object
Constructor Details
#initialize(bp, options = {}) ⇒ Transition
Returns a new instance of Transition.
6 7 8 9 10 11 12 13 |
# File 'lib/workflow/transition.rb', line 6 def initialize(bp, = {}) @from_state = ["from_state"] @to_state = ["to_state"] @on_raise = ["on_raise"] @name = ["name"] @params = ["params"] @business_process = bp end |
Instance Attribute Details
#from_state ⇒ Object
Returns the value of attribute from_state.
4 5 6 |
# File 'lib/workflow/transition.rb', line 4 def from_state @from_state end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/workflow/transition.rb', line 4 def name @name end |
#on_raise ⇒ Object
Returns the value of attribute on_raise.
4 5 6 |
# File 'lib/workflow/transition.rb', line 4 def on_raise @on_raise end |
#params ⇒ Object
Returns the value of attribute params.
4 5 6 |
# File 'lib/workflow/transition.rb', line 4 def params @params end |
#to_state ⇒ Object
Returns the value of attribute to_state.
4 5 6 |
# File 'lib/workflow/transition.rb', line 4 def to_state @to_state end |
#workflow ⇒ Object
Returns the value of attribute workflow.
4 5 6 |
# File 'lib/workflow/transition.rb', line 4 def workflow @workflow end |
Instance Method Details
#perform ⇒ Object
15 16 17 |
# File 'lib/workflow/transition.rb', line 15 def perform raise "Should be override to perform" end |