Sha256: b3b6121c5daf8c2741e3be33b26a56b7d20f7e79d8ccc1b250207e295fff6d2a

Contents?: true

Size: 435 Bytes

Versions: 8

Compression:

Stored size: 435 Bytes

Contents

# frozen_string_literal: true

module Sentry
  # @api private
  class Envelope
    attr_accessor :headers, :items

    def initialize(headers = {})
      @headers = headers
      @items = []
    end

    def add_item(headers, payload)
      @items << Item.new(headers, payload)
    end

    def item_types
      @items.map(&:type)
    end

    def event_id
      @headers[:event_id]
    end
  end
end

require_relative "envelope/item"

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
sentry-ruby-core-5.22.2 lib/sentry/envelope.rb
sentry-ruby-5.22.2 lib/sentry/envelope.rb
sentry-ruby-core-5.22.1 lib/sentry/envelope.rb
sentry-ruby-5.22.1 lib/sentry/envelope.rb
sentry-ruby-5.22.0 lib/sentry/envelope.rb
sentry-ruby-core-5.22.0 lib/sentry/envelope.rb
sentry-ruby-5.21.0 lib/sentry/envelope.rb
sentry-ruby-core-5.21.0 lib/sentry/envelope.rb