class Stackprofiler::Filter::FrameRegexRemoval
Public Class Methods
new(options={})
click to toggle source
# File lib/stackprofiler/filters/frame_regex_removal.rb, line 6 def initialize(options={}) @options = options end
Public Instance Methods
filter(root, run)
click to toggle source
# File lib/stackprofiler/filters/frame_regex_removal.rb, line 15 def filter root, run remove_frames root, run do |node, frame| regexes.any? {|r| frame[:name] =~ r } end end
regexes()
click to toggle source
# File lib/stackprofiler/filters/frame_regex_removal.rb, line 10 def regexes ary = @options[:regexes] || [] @regexes ||= ary.reject(&:blank?).map {|r| /#{r}/ }.compact end