Class: Deltacloud::StateMachine::Transition
- Inherits:
-
Object
- Object
- Deltacloud::StateMachine::Transition
- Defined in:
- lib/deltacloud/state_machine.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#destination ⇒ Object
readonly
Returns the value of attribute destination.
Instance Method Summary collapse
- #automatically ⇒ Object
- #automatically? ⇒ Boolean
-
#initialize(machine, destination) ⇒ Transition
constructor
A new instance of Transition.
- #on(action) ⇒ Object
Constructor Details
#initialize(machine, destination) ⇒ Transition
Returns a new instance of Transition.
62 63 64 65 66 67 |
# File 'lib/deltacloud/state_machine.rb', line 62 def initialize(machine, destination) @machine = machine @destination = destination @auto = false @action = nil end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
60 61 62 |
# File 'lib/deltacloud/state_machine.rb', line 60 def action @action end |
#destination ⇒ Object (readonly)
Returns the value of attribute destination.
59 60 61 |
# File 'lib/deltacloud/state_machine.rb', line 59 def destination @destination end |
Instance Method Details
#automatically ⇒ Object
69 70 71 |
# File 'lib/deltacloud/state_machine.rb', line 69 def automatically @auto = true end |
#automatically? ⇒ Boolean
73 74 75 |
# File 'lib/deltacloud/state_machine.rb', line 73 def automatically? @auto end |
#on(action) ⇒ Object
77 78 79 |
# File 'lib/deltacloud/state_machine.rb', line 77 def on(action) @action = action end |