Method: Enumerable#empty?

Defined in:
lib/jinx/helpers/enumerable.rb

#empty?Boolean

This method is functionally equivalent to to_a.empty but is more concise and efficient.

Returns:

  • (Boolean)

    whether this Enumerable iterates over at least one item



61
62
63
# File 'lib/jinx/helpers/enumerable.rb', line 61

def empty?
  not any? { true }
end