Class: Hash

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

Instance Method Summary collapse

Instance Method Details

#&(other) ⇒ Object



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

def &(other)
  Hash[(self.keys & other.keys).zip(other.values_at(*(self.keys & other.keys)))]
end