Class: Tracee::Preprocessors::QuietAssets

Inherits:
Base
  • Object
show all
Defined in:
lib/tracee/preprocessors/quiet_assets.rb

Instance Method Summary collapse

Methods inherited from Base

#halt!, #inspect

Constructor Details

#initialize(assets_paths = ['assets']) ⇒ QuietAssets

Returns a new instance of QuietAssets.



11
12
13
# File 'lib/tracee/preprocessors/quiet_assets.rb', line 11

def initialize(assets_paths=['assets'])
  @assets_paths_pattern = assets_paths * '|'
end

Instance Method Details

#call(msg_level, datetime, progname, msg, caller_slice = []) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/tracee/preprocessors/quiet_assets.rb', line 15

def call(msg_level, datetime, progname, msg, caller_slice=[])
  if msg =~ %r{^Started GET "/(#@assets_paths_pattern)/}
    halt!
  else
    msg
  end
end