Class: Refinuri::Filters::Array
Instance Attribute Summary
Attributes inherited from Base::Filter
#name, #value
Instance Method Summary
collapse
#initialize, #to_db
Instance Method Details
#delete(value) ⇒ Object
8
9
10
|
# File 'lib/refinuri/filters.rb', line 8
def delete(value)
[value].flatten.each { |v| @value.delete(v) }
end
|
#to_s ⇒ Object
12
13
14
|
# File 'lib/refinuri/filters.rb', line 12
def to_s
value.join(',')
end
|
#update(value) ⇒ Object
4
5
6
|
# File 'lib/refinuri/filters.rb', line 4
def update(value)
(@value << [value]).flatten!.uniq!
end
|