Skip to content

Commit

Permalink
updated readme to show how a callback Proc works
Browse files Browse the repository at this point in the history
  • Loading branch information
alto committed May 23, 2013
1 parent 7b58f12 commit 744689e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -80,7 +80,7 @@ class Job
state :sleeping, :initial => true, :before_enter => :do_something
state :running

event :run, :after => :notify_somebody do
event :run, :after => Proc.new { |user| notify_somebody(user) } do
transitions :from => :sleeping, :to => :running, :on_transition => Proc.new {|obj, *args| obj.set_process(*args) }
end

Expand All @@ -103,7 +103,7 @@ class Job
...
end

def notify_somebody
def notify_somebody(user)
...
end

Expand Down

0 comments on commit 744689e

Please sign in to comment.