Class: MongoQL::Expression::Descend
- Inherits:
-
MongoQL::Expression
- Object
- MongoQL::Expression
- MongoQL::Expression::Descend
- Defined in:
- lib/mongo_ql/expression/descend.rb
Constant Summary
Constants inherited from MongoQL::Expression
Constants included from CollectionOperators
CollectionOperators::AGGREGATE_OPS
Constants included from UnaryOperators
Constants included from BinaryOperators
Instance Attribute Summary collapse
-
#field ⇒ Object
Returns the value of attribute field.
Instance Method Summary collapse
-
#initialize(field) ⇒ Descend
constructor
A new instance of Descend.
- #to_ast ⇒ Object
Methods inherited from MongoQL::Expression
#as_date, #if_null, #then, #type
Methods included from StringOperators
Methods included from CollectionOperators
#any?, #concat_arrays, #contains, #filter, #map, #reduce
Constructor Details
#initialize(field) ⇒ Descend
Returns a new instance of Descend.
7 8 9 |
# File 'lib/mongo_ql/expression/descend.rb', line 7 def initialize(field) @field = field end |
Instance Attribute Details
#field ⇒ Object
Returns the value of attribute field.
5 6 7 |
# File 'lib/mongo_ql/expression/descend.rb', line 5 def field @field end |
Instance Method Details
#to_ast ⇒ Object
11 12 13 |
# File 'lib/mongo_ql/expression/descend.rb', line 11 def to_ast { field.to_s => -1 } end |