Class: Store::Mongodb::LTFilter
- Inherits:
-
Object
- Object
- Store::Mongodb::LTFilter
- Defined in:
- lib/store/mongodb.rb
Instance Method Summary collapse
- #add_filter(hash) ⇒ Object
-
#initialize(field, value) ⇒ LTFilter
constructor
A new instance of LTFilter.
Constructor Details
#initialize(field, value) ⇒ LTFilter
Returns a new instance of LTFilter.
243 244 245 |
# File 'lib/store/mongodb.rb', line 243 def initialize(field, value) @field = field; @value = value end |
Instance Method Details
#add_filter(hash) ⇒ Object
247 248 249 250 251 252 253 |
# File 'lib/store/mongodb.rb', line 247 def add_filter(hash) h = hash[@field] ||= {} if @value != 'unknown' h['$lt'] = @value end end |