Skip to content

Commit

Permalink
some feature here
Browse files Browse the repository at this point in the history
  • Loading branch information
nulldef committed Dec 10, 2017
1 parent 67a814f commit 299f0ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/hooks_spec.rb
Expand Up @@ -7,7 +7,7 @@ class BeforeCar
state :idle
state :driving

event :drive, idle: :driving, before: -> (instance) { instance.started = true }
event :drive, idle: :driving, before: Proc.new { |instance| instance.started = true }
end
end

Expand All @@ -20,7 +20,7 @@ class AfterCar
state :idle
state :driving

event :stop, driving: :idle, after: -> { self.started = false }
event :stop, driving: :idle, after: Proc.new { self.started = false }
end
end

Expand Down

0 comments on commit 299f0ce

Please sign in to comment.