class Airbrake::Filters::RootDirectoryFilter
@api private
Replaces root directory with a label.
def call(notice)
def call(notice) notice[:errors].each do |error| error[:backtrace].each do |frame| next unless (file = frame[:file]) file.sub!(/\A#{@root_directory}/, PROJECT_ROOT_LABEL) end end end
def initialize(root_directory)
def initialize(root_directory) @root_directory = root_directory @weight = 100 end