Sha256: dfc80d5c07b9958a27c2731014075994d048c555ebbab9d03eb61df33efe695e

Contents?: true

Size: 500 Bytes

Versions: 5

Compression:

Stored size: 500 Bytes

Contents

# frozen_string_literal: true

module Representable
  module Hash
    module AllowSymbols
      private

      def filter_wrap_for(data, *args)
        super(Conversion.stringify_keys(data), *args)
      end

      def update_properties_from(data, *args)
        super(Conversion.stringify_keys(data), *args)
      end
    end

    module Conversion
      def self.stringify_keys(hash)
        hash.keys.collect do |key|
          [ key.to_s, hash[key] ]
        end.to_h
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 3 rubygems

Version Path
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/representable-3.2.0/lib/representable/hash/allow_symbols.rb
fluent-plugin-google-cloud-logging-on-prem-0.1.0 vendor/ruby/3.1.0/gems/representable-3.2.0/lib/representable/hash/allow_symbols.rb
representable-3.2.0 lib/representable/hash/allow_symbols.rb
representable-3.1.1 lib/representable/hash/allow_symbols.rb
representable-3.1.0 lib/representable/hash/allow_symbols.rb