Class: Eye::Trigger::Transition

Inherits:
Eye::Trigger show all
Defined in:
lib/eye/trigger/transition.rb

Constant Summary

Constants inherited from Eye::Trigger

TYPES

Instance Attribute Summary

Attributes inherited from Eye::Trigger

#message, #options, #process

Instance Method Summary collapse

Methods inherited from Eye::Trigger

create, #defer, #filter_transition, get_class, #initialize, #inspect, #logger_sub_tag, #logger_tag, name_and_class, #notify, register, requires, #run_in_process_context, validate!

Methods included from Dsl::Validation

included

Constructor Details

This class inherits a constructor from Eye::Trigger

Instance Method Details

#check(trans) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/eye/trigger/transition.rb', line 7

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