Module: Steroids::Extensions::HashExtension

Defined in:
lib/steroids/extensions/hash_extension.rb

Instance Method Summary collapse

Instance Method Details

#fetch_any(*values) ⇒ Object



4
5
6
7
8
9
# File 'lib/steroids/extensions/hash_extension.rb', line 4

def fetch_any(*values)
  matching_key = self.keys.find do |key|
    !!values.include?(key)
  end
  self[matching_key]
end