Class: Cuprum::Collections::Queries::ParseBlock::Builder
- Inherits:
- BasicObject
- Defined in:
- lib/cuprum/collections/queries/parse_block.rb
Overview
Evaluation context for query blocks.
Instance Method Summary collapse
-
#equals(value) ⇒ Array
(also: #equal, #eq)
Generates an equality criterion.
-
#greater_than(value) ⇒ Array
(also: #gt)
Generates a greater than comparison criterion.
-
#greater_than_or_equal_to(value) ⇒ Array
(also: #gte)
Generates a greater than or equal to comparison criterion.
-
#less_than(value) ⇒ Array
(also: #lt)
Generates a less than comparison criterion.
-
#less_than_or_equal_to(value) ⇒ Array
(also: #lte)
Generates a less than or equal to comparison criterion.
-
#not_equal(value) ⇒ Array
(also: #ne)
Generates a negated equality criterion.
-
#not_one_of(value) ⇒ Array
Generates a negated inclusion criterion.
-
#one_of(value) ⇒ Array
Generates an inclusion criterion.
Instance Method Details
#equals(value) ⇒ Array Also known as: equal, eq
Generates an equality criterion.
57 58 59 |
# File 'lib/cuprum/collections/queries/parse_block.rb', line 57 def equals(value) [nil, Operators::EQUAL, value] end |
#greater_than(value) ⇒ Array Also known as: gt
Generates a greater than comparison criterion.
66 67 68 |
# File 'lib/cuprum/collections/queries/parse_block.rb', line 66 def greater_than(value) [nil, Operators::GREATER_THAN, value] end |
#greater_than_or_equal_to(value) ⇒ Array Also known as: gte
Generates a greater than or equal to comparison criterion.
74 75 76 |
# File 'lib/cuprum/collections/queries/parse_block.rb', line 74 def greater_than_or_equal_to(value) [nil, Operators::GREATER_THAN_OR_EQUAL_TO, value] end |
#less_than(value) ⇒ Array Also known as: lt
Generates a less than comparison criterion.
82 83 84 |
# File 'lib/cuprum/collections/queries/parse_block.rb', line 82 def less_than(value) [nil, Operators::LESS_THAN, value] end |
#less_than_or_equal_to(value) ⇒ Array Also known as: lte
Generates a less than or equal to comparison criterion.
90 91 92 |
# File 'lib/cuprum/collections/queries/parse_block.rb', line 90 def less_than_or_equal_to(value) [nil, Operators::LESS_THAN_OR_EQUAL_TO, value] end |
#not_equal(value) ⇒ Array Also known as: ne
Generates a negated equality criterion.
98 99 100 |
# File 'lib/cuprum/collections/queries/parse_block.rb', line 98 def not_equal(value) [nil, Operators::NOT_EQUAL, value] end |
#not_one_of(value) ⇒ Array
Generates a negated inclusion criterion.
106 107 108 |
# File 'lib/cuprum/collections/queries/parse_block.rb', line 106 def not_one_of(value) [nil, Operators::NOT_ONE_OF, value] end |
#one_of(value) ⇒ Array
Generates an inclusion criterion.
113 114 115 |
# File 'lib/cuprum/collections/queries/parse_block.rb', line 113 def one_of(value) [nil, Operators::ONE_OF, value] end |