Sha256: 096a0c1152963a0308c232a4efeacf5c78156c8cc494c2ba06ba9734d8719272

Contents?: true

Size: 401 Bytes

Versions: 2

Compression:

Stored size: 401 Bytes

Contents

module Liquidize
  module Helper
    # Converts all keys to strings
    # @params options [Hash] hash which keys should be stringified
    # @return [Hash] the same hash with stringified keys
    def self.recursive_stringify_keys(options)
      if options.is_a?(Hash)
        options.stringify_keys!
        options.each { |k, v| recursive_stringify_keys(v) }
      end
      options
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
liquidize-0.0.2 lib/liquidize/helper.rb
liquidize-0.0.1 lib/liquidize/helper.rb