peter-murach/finite_machine — pull request #27 by reggieb (2014-10-03 10:44:28+00:00)
Title: Allows the target method to be aliased within a definition

In my current project, I've separated the finite machine from a host Job model using a FiniteMachine::Definition class. In writing the definition, it has struck me that it would be much more readable if I could alias the target method. Using the example from the README:

```ruby
class Engine < FiniteMachine::Definition
initial :neutral

alias_target :car

events {
event :forward, [:reverse, :neutral] => :one
event :shift, :one => :two
event :back, [:neutral, :one] => :reverse
}

callbacks {
on_enter :reverse do |event|
car.turn_reverse_lights_on
end

on_exit :reverse do |event|
car.turn_reverse_lights_off
end
}

handlers {
handle FiniteMachine::InvalidStateError do |exception| ... end
}
end
```