Class: Stackprofiler::Filter::GemRemoval

Inherits:
Object
  • Object
show all
Includes:
RemoveFramesHelper
Defined in:
lib/stackprofiler/filters/gem_removal.rb

Instance Method Summary collapse

Methods included from RemoveFramesHelper

#remove_frames

Constructor Details

#initialize(options = {}) ⇒ GemRemoval

Returns a new instance of GemRemoval.



6
7
# File 'lib/stackprofiler/filters/gem_removal.rb', line 6

def initialize(options={})
end

Instance Method Details

#filter(root, run) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/stackprofiler/filters/gem_removal.rb', line 9

def filter root, run
  remove_frames root, run do |node, frame|
    # todo: gem determination depends on gems being
    # run from the same interpreter/rubygems path
    # as stackprofiler. is that a good idea?
    Gem.path.any? {|p| frame[:file].include?(p) }
  end
end