lib/simple_states.rb in simple_states-0.0.8 vs lib/simple_states.rb in simple_states-0.0.9
- old
+ new
@@ -40,11 +40,11 @@
self.state_names = (self.state_names || []).concat(states.compact.map(&:to_sym)).uniq
end
def event(name, options = {})
add_states(options[:from], options[:to])
- self.events << Event.new(name, options)
+ self.events += [Event.new(name, options)]
end
end
attr_reader :past_states
@@ -66,5 +66,6 @@
def method_missing(method, *args, &block)
method.to_s =~ /(was_|^)(#{self.class.states.join('|')})\?$/ ? send(:"#{$1}state?", $2, *args) : super
end
end
+