class Hash
Public Instance Methods
slice(*keys)
click to toggle source
# File lib/arisaid/core_ext/hash.rb, line 2 def slice(*keys) keys.each_with_object(self.class.new) { |k, hash| hash[k] = self[k] if has_key?(k) } end
stringify_keys()
click to toggle source
# File lib/arisaid/core_ext/hash.rb, line 6 def stringify_keys result = self.class.new each_key { |k| result[k.to_s] = self[k] } result end