lib/eye/trigger/transition.rb in eye-0.6.4 vs lib/eye/trigger/transition.rb in eye-0.7.pre
- old
+ new
@@ -3,13 +3,9 @@
# trigger :transition, :to => :up, :from => :starting, :do => ->{ ... }
param :do, [Proc, Symbol]
def check(trans)
- act = @options[:do]
- if act
- instance_exec(&@options[:do]) if act.is_a?(Proc)
- send(act, process) if act.is_a?(Symbol)
- end
+ exec_proc :do
end
end