Sha256: 94c10210daf213f707b1ee99508d54d5a40f295f5b9c173aa4742f2e4e17b51a

Contents?: true

Size: 239 Bytes

Versions: 5

Compression:

Stored size: 239 Bytes

Contents

class Hash
  unless method_defined?(:stringify_keys)
    def stringify_keys!
      keys.each do |key|
        self[key.to_s] = delete(key)
      end
      self
    end
    
    def stringify_keys
      dup.stringify_keys!
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
docify-1.0.7 lib/docify/utils.rb
docify-1.0.6 lib/docify/utils.rb
docify-1.0.5 lib/docify/utils.rb
docify-1.0.4 lib/docify/utils.rb
docify-1.0.3 lib/docify/utils.rb