Sha256: 4cbafc6784b5db25c5f3fe5a2a1acf8ba6baaf282788b2fe4b0244d79a7964e3

Contents?: true

Size: 419 Bytes

Versions: 7

Compression:

Stored size: 419 Bytes

Contents

# frozen_string_literal: true

module Orthoses
  class CallTracer
    class Lazy
      include Capturable

      attr_reader :captures

      def initialize
        @captures = []
        @lazy_trace_point = LazyTracePoint.new(:call) do |tp|
          @captures << build_capture(tp)
        end
      end

      def trace(name, &block)
        @lazy_trace_point.enable(target: name, &block)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
orthoses-1.5.0 lib/orthoses/call_tracer/lazy.rb
orthoses-1.4.0 lib/orthoses/call_tracer/lazy.rb
orthoses-1.3.0 lib/orthoses/call_tracer/lazy.rb
orthoses-1.2.0 lib/orthoses/call_tracer/lazy.rb
orthoses-1.1.0 lib/orthoses/call_tracer/lazy.rb
orthoses-1.0.0 lib/orthoses/call_tracer/lazy.rb
orthoses-0.11.0 lib/orthoses/call_tracer/lazy.rb