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.



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

#actionObject (readonly)

Returns the value of attribute action.



60
61
62
# File 'lib/deltacloud/state_machine.rb', line 60

def action
  @action
end

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

#automaticallyObject



69
70
71
# File 'lib/deltacloud/state_machine.rb', line 69

def automatically
  @auto = true
end

#automatically?Boolean

Returns:

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