Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/core_ext/hash.rb

Instance Method Summary collapse

Instance Method Details

#select_by_keys(keys = []) ⇒ Object


2
3
4
# File 'lib/core_ext/hash.rb', line 2

def select_by_keys(keys=[])
  self.select { |k, v| keys.include? k }
end