soveran/micromachine — pull request #7 by lwe (2012-05-21 13:48:54+00:00)
Title: added ability to pass arguments to trigger

Extended trigger to accept additional arguments which will be
passed to all callbacks, this allows to pass around informations
like the actor or other contextual details.

```ruby
# Register callback with argument
machine.on(:confirmed) { |user| "admin" if user.admin? }

# Pass around current user as argument
machine.trigger(:confirm, current_user)
```

Also included tests to verify it works as advertized.