class Enumerator

Public Instance Methods

to_b() click to toggle source

Converts enum to a boolean. Returns true if there are any elements. An enumerator whose size cannot be calculated lazily is assumed to be true.

# File lib/mug/bool.rb, line 98
def to_b
  (s = size).nil? || s.to_b
end