Class: Refinuri::Filters::UnboundedRange
Instance Attribute Summary
Attributes inherited from Base::Filter
#name, #value
Instance Method Summary
collapse
#delete, #initialize, #update
Instance Method Details
#numeric_value ⇒ Object
28
29
30
|
# File 'lib/refinuri/filters.rb', line 28
def numeric_value
@value.sub(/\.{2,3}/, '')
end
|
#to_db ⇒ Object
32
33
34
35
36
37
|
# File 'lib/refinuri/filters.rb', line 32
def to_db
case @value
when /^\.\./ then "#{@name} <= #{self.numeric_value}"
when /\.\.$/ then "#{@name} >= #{self.numeric_value}"
end
end
|