Class: Deltacloud::StateMachine::Transition

Inherits:
Object
  • Object
show all
Defined in:
lib/deltacloud/state_machine.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#actionObject (readonly)

Returns the value of attribute action.



77
78
79
# File 'lib/deltacloud/state_machine.rb', line 77

def action
  @action
end

#destinationObject (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

#automaticallyObject



86
87
88
# File 'lib/deltacloud/state_machine.rb', line 86

def automatically
  @auto = true
end

#automatically?Boolean

Returns:

  • (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