Method: Hash#keys?

Defined in:
lib/sc-core-ext/hash.rb

#keys?(*items) ⇒ Boolean

Returns true if #key? would return true for each item specified.

Returns:

  • (Boolean)


15
16
17
18
# File 'lib/sc-core-ext/hash.rb', line 15

def keys?(*items)
  items.flatten.each { |item| return false unless key?(item) }
  true
end