Class: Puffer::Filters::Diapason
- Inherits:
-
Struct
- Object
- Struct
- Puffer::Filters::Diapason
- Defined in:
- lib/puffer/filters.rb
Instance Attribute Summary collapse
-
#from ⇒ Object
Returns the value of attribute from.
-
#till ⇒ Object
Returns the value of attribute till.
Instance Method Summary collapse
Instance Attribute Details
#from ⇒ Object
Returns the value of attribute from
3 4 5 |
# File 'lib/puffer/filters.rb', line 3 def from @from end |
#till ⇒ Object
Returns the value of attribute till
3 4 5 |
# File 'lib/puffer/filters.rb', line 3 def till @till end |
Instance Method Details
#empty? ⇒ Boolean
4 5 6 |
# File 'lib/puffer/filters.rb', line 4 def empty? from.blank? && till.blank? end |
#persisted? ⇒ Boolean
8 9 10 |
# File 'lib/puffer/filters.rb', line 8 def persisted? false end |
#to_query(key) ⇒ Object
12 13 14 |
# File 'lib/puffer/filters.rb', line 12 def to_query(key) {:from => from, :till => till}.to_query(key) end |