Sha256: 70d1b66f61afb15a66d63c030a9fdba5a80c6df579e1a8ba26102f24b0820ef0

Contents?: true

Size: 325 Bytes

Versions: 18

Compression:

Stored size: 325 Bytes

Contents

class Eye::Trigger::Transition < Eye::Trigger

  # 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
  end

end

Version data entries

18 entries across 18 versions & 3 rubygems

Version Path
eye-0.6.4 lib/eye/trigger/transition.rb
eye-0.6.3 lib/eye/trigger/transition.rb
eye-0.6.2 lib/eye/trigger/transition.rb
eye-0.6.2.pre lib/eye/trigger/transition.rb
ace-eye-0.6.5 lib/eye/trigger/transition.rb
ace-eye-0.6.4 lib/eye/trigger/transition.rb
eye-0.6.1 lib/eye/trigger/transition.rb
ace-eye-0.6.3 lib/eye/trigger/transition.rb
ace-eye-0.6.2 lib/eye/trigger/transition.rb
ace-eye-0.6.1 lib/eye/trigger/transition.rb
eye-0.6 lib/eye/trigger/transition.rb
reel-eye-0.5.2.1 lib/eye/trigger/transition.rb
reel-eye-0.5.2 lib/eye/trigger/transition.rb
eye-0.5.2 lib/eye/trigger/transition.rb
reel-eye-0.5.1 lib/eye/trigger/transition.rb
eye-0.5.1 lib/eye/trigger/transition.rb
reel-eye-0.5 lib/eye/trigger/transition.rb
eye-0.5 lib/eye/trigger/transition.rb