Sha256: eac4bb50ef8c287a92c1650a5a4983133c9d47bbfccd5df237f46020774416c1

Contents?: true

Size: 239 Bytes

Versions: 5

Compression:

Stored size: 239 Bytes

Contents

# frozen_string_literal: true

module Rubanok
  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

5 entries across 5 versions & 1 rubygems

Version Path
rubanok-0.2.1 lib/rubanok/ext/symbolize_keys.rb
rubanok-0.2.0 lib/rubanok/ext/symbolize_keys.rb
rubanok-0.1.3 lib/rubanok/ext/symbolize_keys.rb
rubanok-0.1.1 lib/rubanok/ext/symbolize_keys.rb
rubanok-0.1.0 lib/rubanok/ext/symbolize_keys.rb