Class: Cuprum::Collections::Scope
- Inherits:
-
Cuprum::Collections::Scopes::CriteriaScope
- Object
- Cuprum::Collections::Scopes::Base
- Cuprum::Collections::Scopes::CriteriaScope
- Cuprum::Collections::Scope
- Defined in:
- lib/cuprum/collections/scope.rb
Overview
Generic scope class for defining collection-independent criteria scopes.
Instance Attribute Summary
Attributes included from Cuprum::Collections::Scopes::Criteria
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(value = nil) { ... } ⇒ Array
constructor
A new instance of Scope.
Methods included from Cuprum::Collections::Scopes::Criteria
#==, #and, #as_json, #debug, #empty?, #invert, #inverted?, #or, #type, #with_criteria
Methods inherited from Cuprum::Collections::Scopes::Base
#==, #as_json, #debug, #empty?, #invert, #type
Methods included from Cuprum::Collections::Scopes::Composition
Constructor Details
#initialize(value = nil) { ... } ⇒ Array
Returns a new instance of Scope.
23 24 25 26 27 |
# File 'lib/cuprum/collections/scope.rb', line 23 def initialize(*, inverted: false, &) criteria = self.class.parse(*, &) super(criteria:, inverted:) end |
Class Method Details
.build(value = nil, &block) ⇒ Object
11 12 13 |
# File 'lib/cuprum/collections/scope.rb', line 11 def self.build(...) new(...) end |