Class: Cuprum::Collections::Basic::Scopes::ConjunctionScope
- Inherits:
-
Base
- Object
- Scopes::Base
- Base
- Cuprum::Collections::Basic::Scopes::ConjunctionScope
- Includes:
- Scopes::Conjunction
- Defined in:
- lib/cuprum/collections/basic/scopes/conjunction_scope.rb
Overview
Scope for filtering data matching all of the given scopes.
Instance Attribute Summary
Attributes included from Scopes::Container
Instance Method Summary collapse
-
#match?(item:) ⇒ Boolean
(also: #matches?)
Returns true if the provided item matches all of the configured scopes.
Methods included from Scopes::Conjunction
Methods included from Scopes::Container
#==, #as_json, #debug, #empty?, #initialize, #with_scopes
Methods inherited from Base
Methods inherited from Scopes::Base
#==, #as_json, #debug, #empty?, #initialize, #invert, #type
Methods included from Scopes::Composition
Instance Method Details
#match?(item:) ⇒ Boolean Also known as: matches?
Returns true if the provided item matches all of the configured scopes.
13 14 15 16 17 |
# File 'lib/cuprum/collections/basic/scopes/conjunction_scope.rb', line 13 def match?(item:) super scopes.all? { |scope| scope.match?(item:) } end |