Module: Srm::Hash

Extended by:
Hash
Included in:
Hash
Defined in:
lib/srm/hash.rb

Instance Method Summary collapse

Instance Method Details

#has_truthy_member?(hash, key) ⇒ Boolean

Returns:

  • (Boolean)


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

def has_truthy_member?(hash, key)
  hash[key] ? true : false
end

#is_not_empty?(hash) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/srm/hash.rb', line 7

def is_not_empty?(hash)
  hash.length > 0
end