Class: SystemMetrics::Instrument::ActionView

Inherits:
Base
  • Object
show all
Defined in:
lib/system_metrics/instrument/action_view.rb

Instance Attribute Summary

Attributes inherited from Base

#pattern

Instance Method Summary collapse

Methods inherited from Base

#handles?, #ignore?, #mapped_paths, #prune_path

Constructor Details

#initializeActionView

Returns a new instance of ActionView.



5
6
7
# File 'lib/system_metrics/instrument/action_view.rb', line 5

def initialize
  super /\.action_view$/
end

Instance Method Details

#prepare(event) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/system_metrics/instrument/action_view.rb', line 9

def prepare(event)
  event.payload.each do |key, value|
    case value
    when NilClass
    when String
      event.payload[key] = prune_path(value)
    else
      event.payload[key] = value
    end
  end
end