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.
79 80 81 82 83 84 |
# File 'lib/deltacloud/state_machine.rb', line 79 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.
77 78 79 |
# File 'lib/deltacloud/state_machine.rb', line 77 def action @action end |
#destination ⇒ Object (readonly)
Returns the value of attribute destination.
76 77 78 |
# File 'lib/deltacloud/state_machine.rb', line 76 def destination @destination end |
Instance Method Details
#automatically ⇒ Object
86 87 88 |
# File 'lib/deltacloud/state_machine.rb', line 86 def automatically @auto = true end |
#automatically? ⇒ Boolean
90 91 92 |
# File 'lib/deltacloud/state_machine.rb', line 90 def automatically? @auto end |
#on(action) ⇒ Object
94 95 96 |
# File 'lib/deltacloud/state_machine.rb', line 94 def on(action) @action = action end |