lib/transitions/state_transition.rb in transitions-0.2.0 vs lib/transitions/state_transition.rb in transitions-0.2.1
- old
+ new
@@ -23,11 +23,11 @@
# We should probably drop args altogether in case we get an array.
obj.send(callback, *args)
end
else
# TODO We probably should check for this in the constructor and not that late.
- raise ArgumentError, "You can only pass a Symbol, a String, a Proc or an Array to 'on_transition' - got #{@on_transition.class}." unless @on_transition.nil?
+ fail ArgumentError, "You can only pass a Symbol, a String, a Proc or an Array to 'on_transition' - got #{@on_transition.class}." unless @on_transition.nil?
end
end
def ==(obj)
@from == obj.from && @to == obj.to
@@ -35,10 +35,10 @@
def from?(value)
@from == value
end
- private
+ private
def perform_guard(obj, guard, *args)
if guard.respond_to?(:call)
guard.call(obj, *args)
elsif guard.is_a?(Symbol) || guard.is_a?(String)