Sha256: 8d8a8218e71d65900505ddcd69208a9add11188d9b8d449b3022b9d13d773af9
Contents?: true
Size: 632 Bytes
Versions: 77
Compression:
Stored size: 632 Bytes
Contents
module Rollbar module Encoding class << self attr_accessor :encoding_class end def self.setup if String.instance_methods.include?(:encode) require 'rollbar/encoding/encoder' self.encoding_class = Rollbar::Encoding::Encoder else require 'rollbar/encoding/legacy_encoder' self.encoding_class = Rollbar::Encoding::LegacyEncoder end end def self.encode(object) can_be_encoded = object.is_a?(String) || object.is_a?(Symbol) return object unless can_be_encoded encoding_class.new(object).encode end end end Rollbar::Encoding.setup
Version data entries
77 entries across 77 versions & 1 rubygems