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.21.0 lib/sentry/utils/custom_inspection.rb
sentry-ruby-core-5.21.0 lib/sentry/utils/custom_inspection.rb
sentry-ruby-5.20.1 lib/sentry/utils/custom_inspection.rb
sentry-ruby-core-5.20.1 lib/sentry/utils/custom_inspection.rb
sentry-ruby-5.20.0 lib/sentry/utils/custom_inspection.rb
sentry-ruby-core-5.20.0 lib/sentry/utils/custom_inspection.rb
sentry-ruby-core-5.19.0 lib/sentry/utils/custom_inspection.rb
sentry-ruby-5.19.0 lib/sentry/utils/custom_inspection.rb
sentry-ruby-core-5.18.2 lib/sentry/utils/custom_inspection.rb
sentry-ruby-5.18.2 lib/sentry/utils/custom_inspection.rb
sentry-ruby-core-5.18.1 lib/sentry/utils/custom_inspection.rb
sentry-ruby-5.18.1 lib/sentry/utils/custom_inspection.rb
sentry-ruby-5.18.0 lib/sentry/utils/custom_inspection.rb
sentry-ruby-core-5.18.0 lib/sentry/utils/custom_inspection.rb
sentry-ruby-core-5.17.3 lib/sentry/utils/custom_inspection.rb
sentry-ruby-5.17.3 lib/sentry/utils/custom_inspection.rb
sentry-ruby-5.17.2 lib/sentry/utils/custom_inspection.rb
sentry-ruby-core-5.17.2 lib/sentry/utils/custom_inspection.rb
sentry-ruby-core-5.17.1 lib/sentry/utils/custom_inspection.rb
sentry-ruby-5.17.1 lib/sentry/utils/custom_inspection.rb