class Yap::FilterColumn
Multiple filter for a column can be separated by comma (,).
Attributes
name[R]
Public Class Methods
new(name)
click to toggle source
# File lib/yap/filter_column.rb, line 10 def initialize(name) @name = name @values = [] end
Public Instance Methods
not()
click to toggle source
# File lib/yap/filter_column.rb, line 29 def not @values.select do |v| v.condition == :not end.map(&:value) end
parse_values(values)
click to toggle source
# File lib/yap/filter_column.rb, line 15 def parse_values(values) values.to_s.split(',').each do |value| filter_value = FilterValue.new filter_value.parse_value(value) @values << filter_value end end
where()
click to toggle source
# File lib/yap/filter_column.rb, line 23 def where @values.select do |v| v.condition == :where end.map(&:value) end