Sha256: d0e0d93262536ff242dac40a054f48a66826a9740263bf39f5f568ec3fe4dd9a

Contents?: true

Size: 642 Bytes

Versions: 3

Compression:

Stored size: 642 Bytes

Contents

# frozen_string_literal: true

module Sentry
  class Interface
    def self.inherited(klass)
      name = klass.name.split("::").last.downcase.gsub("interface", "")
      registered[name.to_sym] = klass
      super
    end

    def self.registered
      @@registered ||= {} # rubocop:disable Style/ClassVars
    end

    def to_hash
      Hash[instance_variables.map { |name| [name[1..-1].to_sym, instance_variable_get(name)] }]
    end
  end
end

require "sentry/interfaces/exception"
require "sentry/interfaces/request"
require "sentry/interfaces/single_exception"
require "sentry/interfaces/stacktrace"
require "sentry/interfaces/threads"

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sentry-ruby-core-4.8.3 lib/sentry/interface.rb
sentry-ruby-core-4.8.2 lib/sentry/interface.rb
sentry-ruby-core-4.8.1 lib/sentry/interface.rb