Module: Enumerable
- Defined in:
- lib/rubyexts/enumerable.rb
Instance Method Summary collapse
-
#none? {|block| ... } ⇒ Array<String>
Enumerable#none? is the logical opposite of the builtin method Enumerable#any?.
Instance Method Details
#none? {|block| ... } ⇒ Array<String>
Enumerable#none? is the logical opposite of the builtin method Enumerable#any?. It returns true
if and only if none of the elements in the collection satisfy the predicate.
If no predicate is provided, Enumerable#none? returns true
if and only if none of the elements have a true value (i.e. not nil
or false
).
27 28 29 |
# File 'lib/rubyexts/enumerable.rb', line 27 def none?(&block) not self.any?(&block) end |