class Hash
Public Instance Methods
notempty? → nil or self
click to toggle source
Returns self if and only if hash is not empty,
nil otherwise.
{ :a => "A"}.notempty? #=> { :a => "A"}
{}.notempty? #=> nil
VALUE
rb_hash_notempty_p( VALUE hash)
{
return RHASH_SIZE( hash) == 0 ? Qnil : hash;
}