Class: OmgPullRequest::Plugin::Instrumenter

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/omg_pull_request/plugin.rb

Instance Method Summary collapse

Constructor Details

#initializeInstrumenter

Returns a new instance of Instrumenter.



26
27
28
29
30
# File 'lib/omg_pull_request/plugin.rb', line 26

def initialize
  Plugin.initialize do |attributes|
    @attributes = attributes
  end
end

Instance Method Details

#instrument(event, args) ⇒ Object



32
33
34
# File 'lib/omg_pull_request/plugin.rb', line 32

def instrument(event, args)
  ActiveSupport::Notifications.instrument("omgpr:#{event}", (@attributes || {}).merge(args))
end