Skip to content

Commit

Permalink
Enables the transition statement to take a hash with multiple start_s…
Browse files Browse the repository at this point in the history
…tate=>end_state pairs. Fixed small typo reg a switched singular/plural case.
  • Loading branch information
Spiralis authored and bryanlarsen committed Jul 8, 2011
1 parent acac70c commit d796b9b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hobo/lib/hobo/model/lifecycles.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ def create(name, options={}, &block)
end

def transition(name, change, options={}, &block)
change.each do |k,v|
h = {k=>v}
@lifecycle.def_transition(name, Array(h.keys.first), h.values.first, block, options)
end
change.each do |k,v|
h = {k=>v}
@lifecycle.def_transition(name, Array(h.keys.first), h.values.first, block, options)
end
end

def invariant(&block)
Expand Down

0 comments on commit d796b9b

Please sign in to comment.