module ExMachina::Event::ClassMethods

Public Instance Methods

can_fire?(context) click to toggle source
# File lib/ex_machina/event.rb, line 28
def can_fire?(context)
  self.new(context).can_fire?
end
event() click to toggle source
# File lib/ex_machina/event.rb, line 31
def event
  @event ||= Util::String.new(self.name).demodulize.underscore
end
fire(context) click to toggle source
# File lib/ex_machina/event.rb, line 22
def fire(context)
  self.new(context).fire
end
fire!(context) click to toggle source
# File lib/ex_machina/event.rb, line 25
def fire!(context)
  self.new(context).fire!
end
transition(*args) click to toggle source
# File lib/ex_machina/event.rb, line 19
def transition(*args)
  transitions << Transition.new(*args)
end
transitions() click to toggle source
# File lib/ex_machina/event.rb, line 16
def transitions
  @transitions ||= []
end