Module: Controll::Enabler::Notify

Extended by:
ActiveSupport::Concern
Includes:
Controll::Event::Helper
Defined in:
lib/controll/enabler/notify.rb

Instance Method Summary collapse

Methods included from Controll::Event::Helper

#create_event, #normalize

Instance Method Details

#eventsObject

event stack



25
26
27
# File 'lib/controll/enabler/notify.rb', line 25

def events
  @events ||= Controll::Events.new
end

#main_eventObject



29
30
31
# File 'lib/controll/enabler/notify.rb', line 29

def main_event
  events.last || create_success
end

#notify(event, *args) ⇒ Object



19
20
21
22
# File 'lib/controll/enabler/notify.rb', line 19

def notify event, *args
  events << normalize(event, *args)
  self # enable method chaining on controller
end