class Shrine::Plugins::Instrumentation::Event

  1. lib/shrine/plugins/instrumentation.rb
Superclass: Object

Abstracts away different kind of event objects (ActiveSupport::Notifications::Event and Dry::Events::Event).

Methods

Public Class

  1. new

Public Instance

  1. []
  2. duration
  3. event
  4. name
  5. payload

Attributes

event [R]

Public Class methods

new(event)
[show source]
    # File lib/shrine/plugins/instrumentation.rb
189 def initialize(event)
190   @event = event
191 end

Public Instance methods

[](name)
[show source]
    # File lib/shrine/plugins/instrumentation.rb
201 def [](name)
202   event.payload.fetch(name)
203 end
duration()
[show source]
    # File lib/shrine/plugins/instrumentation.rb
205 def duration
206   library_send(:duration)
207 end
name()
[show source]
    # File lib/shrine/plugins/instrumentation.rb
193 def name
194   library_send(:name).chomp(".shrine").to_sym
195 end
payload()
[show source]
    # File lib/shrine/plugins/instrumentation.rb
197 def payload
198   event.payload
199 end