Module: Async::Enumerable::Methods::Predicates::Include
- Defined in:
- lib/async/enumerable/methods/predicates/include.rb
Class Method Summary collapse
-
.included(base) ⇒ Object
Dependency.
Instance Method Summary collapse
-
#include?(obj) ⇒ Boolean
(also: #member?)
Checks if enumerable includes the object (parallel, early termination).
Class Method Details
.included(base) ⇒ Object
Dependency
8 |
# File 'lib/async/enumerable/methods/predicates/include.rb', line 8 def self.included(base) = base.include(Any) # Dependency |
Instance Method Details
#include?(obj) ⇒ Boolean Also known as: member?
Checks if enumerable includes the object (parallel, early termination).
13 14 15 |
# File 'lib/async/enumerable/methods/predicates/include.rb', line 13 def include?(obj) any? { |item| item == obj } end |