Module: Async::Enumerable::Methods::Predicates::None
- Defined in:
- lib/async/enumerable/methods/predicates/none.rb
Class Method Summary collapse
-
.included(base) ⇒ Object
Dependency.
Instance Method Summary collapse
-
#none?(pattern = nil) {|item| ... } ⇒ Boolean
Returns true if no elements satisfy the condition (parallel, early termination).
Class Method Details
.included(base) ⇒ Object
Dependency
8 |
# File 'lib/async/enumerable/methods/predicates/none.rb', line 8 def self.included(base) = base.include(Any) # Dependency |
Instance Method Details
#none?(pattern = nil) {|item| ... } ⇒ Boolean
Returns true if no elements satisfy the condition (parallel, early termination).
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/async/enumerable/methods/predicates/none.rb', line 13 def none?(pattern = nil, &block) # Delegate pattern/no-block cases to wrapped enumerable to avoid break issues if pattern return __async_enumerable_collection.none?(pattern) elsif !block_given? return __async_enumerable_collection.none? end # For blocks, use our async any? and negate !any?(&block) end |