lib/cistern/hash.rb in cistern-2.2.3 vs lib/cistern/hash.rb in cistern-2.2.4

- old
+ new

@@ -1,9 +1,9 @@ class Cistern::Hash def self.slice(hash, *keys) {}.tap do |sliced| - keys.each{ |k| sliced[k] = hash[k] if hash.key?(k) } + keys.each { |k| sliced[k] = hash[k] if hash.key?(k) } end end def self.except(hash, *keys) Cistern::Hash.except!(hash.dup, *keys) @@ -16,12 +16,12 @@ end def self.stringify_keys(object) case object when Hash - object.inject({}){|r,(k,v)| r.merge(k.to_s => stringify_keys(v))} + object.inject({}) { |r, (k, v)| r.merge(k.to_s => stringify_keys(v)) } when Array - object.map{|v| stringify_keys(v) } + object.map { |v| stringify_keys(v) } else object end end end