lib/aasm/supporting_classes/state_transition.rb in aasm-3.0.0 vs lib/aasm/supporting_classes/state_transition.rb in aasm-3.0.1
- old
+ new
@@ -7,9 +7,10 @@
def initialize(opts)
@from, @to, @guard, @on_transition = opts[:from], opts[:to], opts[:guard], opts[:on_transition]
@opts = opts
end
+ # TODO: should be named allowed? or similar
def perform(obj, *args)
case @guard
when Symbol, String
obj.send(@guard, *args)
when Proc