175 |
# |
# |
176 |
def transition(state) |
def transition(state) |
177 |
currentState = @base_slot["state"].data |
currentState = @base_slot["state"].data |
178 |
|
self["log/info"] << "State transition: #{currentState} -> #{state}" |
179 |
unless LEGAL_TRANSITIONS[currentState].include?(state) |
unless LEGAL_TRANSITIONS[currentState].include?(state) |
180 |
raise "Cannot transition to #{state} from #{currentState}" |
raise "Cannot transition to #{state} from #{currentState}" |
181 |
end |
end |
182 |
@base_slot["state"].data = state |
@base_slot["state"].data = state |
|
self["log/info"] << "State transition: #{currentState} -> #{state}" |
|
183 |
end |
end |
184 |
|
|
185 |
## |
## |