Sha256: 554b9fd0b8186e1305d9f57a6613f42fe0423fcb21524db002110c8fa4378847

Contents?: true

Size: 380 Bytes

Versions: 77

Compression:

Stored size: 380 Bytes

Contents

require 'iconv'

module Rollbar
  module Encoding
    class LegacyEncoder
      attr_accessor :object

      def initialize(object)
        @object = object
      end

      def encode
        value = object.to_s
        encoded_value = ::Iconv.conv('UTF-8//IGNORE', 'UTF-8', value)

        object.is_a?(Symbol) ? encoded_value.to_sym : encoded_value
      end
    end
  end
end

Version data entries

77 entries across 77 versions & 1 rubygems

Version Path
rollbar-3.3.3 lib/rollbar/encoding/legacy_encoder.rb
rollbar-3.3.2 lib/rollbar/encoding/legacy_encoder.rb
rollbar-3.3.1 lib/rollbar/encoding/legacy_encoder.rb
rollbar-3.3.0 lib/rollbar/encoding/legacy_encoder.rb
rollbar-3.2.0 lib/rollbar/encoding/legacy_encoder.rb
rollbar-3.1.2 lib/rollbar/encoding/legacy_encoder.rb
rollbar-3.1.1 lib/rollbar/encoding/legacy_encoder.rb
rollbar-3.1.0 lib/rollbar/encoding/legacy_encoder.rb
rollbar-3.0.1 lib/rollbar/encoding/legacy_encoder.rb
rollbar-3.0.0 lib/rollbar/encoding/legacy_encoder.rb
rollbar-2.27.1 lib/rollbar/encoding/legacy_encoder.rb
rollbar-2.27.0 lib/rollbar/encoding/legacy_encoder.rb
rollbar-2.26.1 lib/rollbar/encoding/legacy_encoder.rb
rollbar-2.26.0 lib/rollbar/encoding/legacy_encoder.rb
rollbar-2.25.1 lib/rollbar/encoding/legacy_encoder.rb
rollbar-2.25.0 lib/rollbar/encoding/legacy_encoder.rb
rollbar-2.24.0 lib/rollbar/encoding/legacy_encoder.rb
rollbar-2.23.2 lib/rollbar/encoding/legacy_encoder.rb
rollbar-2.23.1 lib/rollbar/encoding/legacy_encoder.rb
rollbar-2.23.0 lib/rollbar/encoding/legacy_encoder.rb