Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/rscale/helpers.rb

Instance Method Summary collapse

Instance Method Details

#extract(*keys) ⇒ Object



12
13
14
# File 'lib/rscale/helpers.rb', line 12

def extract(*keys)
  keys.inject({}) { |h,k| h[k] = self[k] if key?(k); h }
end