Sha256: e40524f9e89077869564cb725f981395183fde73f8946cd9ab7a7893b292dbc9

Contents?: true

Size: 390 Bytes

Versions: 14

Compression:

Stored size: 390 Bytes

Contents

# frozen_string_literal: true

module InstrumentAllTheThings
  module Testing
    class TraceTracker
      attr_reader :traces

      def self.tracker
        @tracker ||= new
      end

      def initialize
        reset!
      end

      def reset!
        @traces = []
      end

      def <<(val)
        @traces.concat(MessagePack.load(val[:body]).flatten)
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
instrument_all_the_things-1.4.0 lib/instrument_all_the_things/testing/trace_tracker.rb
instrument_all_the_things-4.0.0 lib/instrument_all_the_things/testing/trace_tracker.rb
instrument_all_the_things-3.1.2 lib/instrument_all_the_things/testing/trace_tracker.rb
instrument_all_the_things-3.1.2.pre1 lib/instrument_all_the_things/testing/trace_tracker.rb
instrument_all_the_things-3.1.1 lib/instrument_all_the_things/testing/trace_tracker.rb
instrument_all_the_things-3.1.0 lib/instrument_all_the_things/testing/trace_tracker.rb
instrument_all_the_things-3.1.0.pre1 lib/instrument_all_the_things/testing/trace_tracker.rb
instrument_all_the_things-3.0.0 lib/instrument_all_the_things/testing/trace_tracker.rb
instrument_all_the_things-3.0.0.pre1 lib/instrument_all_the_things/testing/trace_tracker.rb
instrument_all_the_things-2.0.2 lib/instrument_all_the_things/testing/trace_tracker.rb
instrument_all_the_things-2.0.1 lib/instrument_all_the_things/testing/trace_tracker.rb
instrument_all_the_things-2.0.0 lib/instrument_all_the_things/testing/trace_tracker.rb
instrument_all_the_things-1.3.1 lib/instrument_all_the_things/testing/trace_tracker.rb
instrument_all_the_things-1.3.0 lib/instrument_all_the_things/testing/trace_tracker.rb