Sha256: 3749570017fe4600dd5d2ea08f4ef2d74bd76c443b0beee2a72b6299398f41a6

Contents?: true

Size: 215 Bytes

Versions: 3

Compression:

Stored size: 215 Bytes

Contents

module BloodContracts
  module SymbolizeKeys
    refine Hash do
      def symbolize_keys
        each_with_object({}) do |(key, value), acc|
          acc[key.to_sym] = value
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
blood_contracts-core-0.4.4 lib/blood_contracts/ext/symbolize_keys.rb
blood_contracts-core-0.4.3 lib/blood_contracts/ext/symbolize_keys.rb
blood_contracts-core-0.4.2 lib/blood_contracts/ext/symbolize_keys.rb