Class: RediSearch::Aggregate::Reducers::Count
- Inherits:
-
RediSearch::ApplicationClause
- Object
- RediSearch::ApplicationClause
- RediSearch::Aggregate::Reducers::Count
- Defined in:
- lib/redi_search/aggregate/reducers/count.rb
Instance Method Summary collapse
- #clause ⇒ Object
-
#initialize(as:) ⇒ Count
constructor
A new instance of Count.
Methods inherited from RediSearch::ApplicationClause
#clause_order, clause_order, clause_term
Methods included from Validatable
Constructor Details
#initialize(as:) ⇒ Count
Returns a new instance of Count.
9 10 11 |
# File 'lib/redi_search/aggregate/reducers/count.rb', line 9 def initialize(as:) @as = as end |
Instance Method Details
#clause ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/redi_search/aggregate/reducers/count.rb', line 13 def clause validate! command = ["REDUCE", "COUNT", 0] command += ["AS", as] if as command end |