Sha256: b065fc0e1255862881b1c9d88bd326454fdeb421ac5bc0951d7d87225af2f1d5

Contents?: true

Size: 334 Bytes

Versions: 2

Compression:

Stored size: 334 Bytes

Contents

module Rubrowser
  class Trace
    def initialize(path: "")
      @path = path
    end

    def run
      trace_point.enable
    end

    private

    attr_reader :path

    def trace_point
      @trace_point ||= TracePoint.new(:call) do |tp|
        $wr.puts tp.defined_class if tp.path.start_with?(path)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rubrowser-2.7.1 lib/rubrowser/trace.rb
rubrowser-2.7.0 lib/rubrowser/trace.rb