Sha256: ece1802a9ee5a99d83c1507cdc84959f6f159ff4f48bba32f9bb4bf800be7496

Contents?: true

Size: 575 Bytes

Versions: 16

Compression:

Stored size: 575 Bytes

Contents

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"

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
sentry-ruby-core-4.1.6 lib/sentry/interface.rb
sentry-ruby-core-4.1.5 lib/sentry/interface.rb
sentry-ruby-core-4.1.5.pre.beta.1 lib/sentry/interface.rb
sentry-ruby-core-4.1.5.pre.beta.0 lib/sentry/interface.rb
sentry-ruby-4.1.4 lib/sentry/interface.rb
sentry-ruby-4.1.3 lib/sentry/interface.rb
sentry-ruby-4.1.2 lib/sentry/interface.rb
sentry-ruby-4.1.1 lib/sentry/interface.rb
sentry-ruby-4.1.0 lib/sentry/interface.rb
sentry-ruby-4.0.1 lib/sentry/interface.rb
sentry-ruby-4.0.0 lib/sentry/interface.rb
sentry-ruby-0.3.0 lib/sentry/interface.rb
sentry-ruby-0.2.0 lib/sentry/interface.rb
sentry-ruby-0.1.3 lib/sentry/interface.rb
sentry-ruby-0.1.2 lib/sentry/interface.rb
sentry-ruby-0.1.1 lib/sentry/interface.rb