Class: ActiveUsage::Recorder

Inherits:
Object
  • Object
show all
Defined in:
lib/active_usage/recorder.rb

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ Recorder

Returns a new instance of Recorder.



5
6
7
# File 'lib/active_usage/recorder.rb', line 5

def initialize(attributes)
  @attributes = attributes
end

Instance Method Details

#call(store) ⇒ Object



9
10
11
12
13
14
# File 'lib/active_usage/recorder.rb', line 9

def call(store)
  store.record(event)
  ActiveSupport::Notifications.instrument("activeusage.event_recorded", event: event)

  event
end