Sha256: 0366f85196e980f936d284f9dc81c9a2b5f746b12ad5486984805e91f668b505

Contents?: true

Size: 393 Bytes

Versions: 72

Compression:

Stored size: 393 Bytes

Contents

# frozen_string_literal: true

module Sentry
  module CustomInspection
    def inspect
      attr_strings = (instance_variables - self.class::SKIP_INSPECTION_ATTRIBUTES).each_with_object([]) do |attr, result|
        value = instance_variable_get(attr)
        result << "#{attr}=#{value.inspect}" if value
      end

      "#<#{self.class.name} #{attr_strings.join(", ")}>"
    end
  end
end

Version data entries

72 entries across 72 versions & 2 rubygems

Version Path
sentry-ruby-5.10.0 lib/sentry/utils/custom_inspection.rb
sentry-ruby-core-5.10.0 lib/sentry/utils/custom_inspection.rb
sentry-ruby-5.9.0 lib/sentry/utils/custom_inspection.rb
sentry-ruby-core-5.9.0 lib/sentry/utils/custom_inspection.rb
sentry-ruby-core-5.8.0 lib/sentry/utils/custom_inspection.rb
sentry-ruby-5.8.0 lib/sentry/utils/custom_inspection.rb
sentry-ruby-core-5.7.0 lib/sentry/utils/custom_inspection.rb
sentry-ruby-5.7.0 lib/sentry/utils/custom_inspection.rb
sentry-ruby-core-5.6.0 lib/sentry/utils/custom_inspection.rb
sentry-ruby-5.6.0 lib/sentry/utils/custom_inspection.rb
sentry-ruby-core-5.5.0 lib/sentry/utils/custom_inspection.rb
sentry-ruby-5.5.0 lib/sentry/utils/custom_inspection.rb
sentry-ruby-5.4.2 lib/sentry/utils/custom_inspection.rb
sentry-ruby-core-5.4.2 lib/sentry/utils/custom_inspection.rb
sentry-ruby-5.4.1 lib/sentry/utils/custom_inspection.rb
sentry-ruby-core-5.4.1 lib/sentry/utils/custom_inspection.rb
sentry-ruby-core-5.4.0 lib/sentry/utils/custom_inspection.rb
sentry-ruby-core-5.3.1 lib/sentry/utils/custom_inspection.rb
sentry-ruby-core-5.3.0 lib/sentry/utils/custom_inspection.rb
sentry-ruby-core-5.2.1 lib/sentry/utils/custom_inspection.rb