Merge pull request #51 from ernie/intialize-copy

Use Ruby's initialize_copy for clone/dup
This commit is contained in:
Thorsten Böttger 2012-06-28 03:50:50 -07:00
commit 21394075f2
1 changed files with 6 additions and 7 deletions

View File

@ -19,11 +19,10 @@ module AASM
@config = OpenStruct.new
end
def clone
klone = super
klone.states = states.clone
klone.events = events.clone
klone
def initialize_copy(orig)
super
@states = @states.dup
@events = @events.dup
end
def create_state(name, options)