From 81c4dea66f8215b0426ff28743ea1c7e5a6ef699 Mon Sep 17 00:00:00 2001 From: Naveed Kakal Date: Mon, 24 Aug 2015 19:06:27 -0500 Subject: [PATCH] Updates 'Callbacks' section example to be correct The current example is trying to define a before block inside of a transition block, which is not a supported callback. Moving the before block in to the event block for an example that is supported. --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 06d2ec4..6927d70 100644 --- a/README.md +++ b/README.md @@ -99,11 +99,11 @@ class Job state :running event :run, :after => :notify_somebody do - transitions :from => :sleeping, :to => :running, :after => Proc.new {|*args| set_process(*args) } do - before do - log('Preparing to run') - end + before do + log('Preparing to run') end + + transitions :from => :sleeping, :to => :running, :after => Proc.new {|*args| set_process(*args) } end event :sleep do