Module: Searching::GuideProgress::QueryOperands
Instance Method Summary
collapse
#current_query_operand, #current_query_operand_method
Instance Method Details
#close_to(value) ⇒ Object
14
15
16
|
# File 'lib/mumuki/classroom/models/searching/guide_progress.rb', line 14
def close_to(value)
more_than(value - 1).merge(less_than value + 1)
end
|
#default_query_operand ⇒ Object
18
19
20
|
# File 'lib/mumuki/classroom/models/searching/guide_progress.rb', line 18
def default_query_operand
:more_than
end
|
#less_than(value) ⇒ Object
10
11
12
|
# File 'lib/mumuki/classroom/models/searching/guide_progress.rb', line 10
def less_than(value)
{'$lte': value}
end
|
#more_than(value) ⇒ Object
6
7
8
|
# File 'lib/mumuki/classroom/models/searching/guide_progress.rb', line 6
def more_than(value)
{'$gte': value}
end
|