Sha256: ed7b58cd1059ac6f6ac8445a214a28b75d02cbfa62b7fc6aebc8ee1f826855d4

Contents?: true

Size: 223 Bytes

Versions: 8

Compression:

Stored size: 223 Bytes

Contents

module LitmusPaper
  class Util
    def self.symbolize_keys(hash)
      hash.keys.each do |k|
        new_key = (k.to_sym rescue k.to_s.to_sym)
        hash[new_key] = hash.delete(k)
      end

      hash
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
litmus_paper-1.6.2 lib/litmus_paper/util.rb
litmus_paper-1.6.1 lib/litmus_paper/util.rb
litmus_paper-1.6.0 lib/litmus_paper/util.rb
litmus_paper-1.5.0 lib/litmus_paper/util.rb
litmus_paper-1.4.2 lib/litmus_paper/util.rb
litmus_paper-1.4.1 lib/litmus_paper/util.rb
litmus_paper-1.3.0 lib/litmus_paper/util.rb
litmus_paper-1.2.0 lib/litmus_paper/util.rb