class NCCConfidence::D_Filters

Public Class Methods

build(filter_object) click to toggle source
# File lib/nccconfidence/data_filters.rb, line 5
def build filter_object
    "[#{make_filter(filter_object)}]" 
end
make_filter(items) click to toggle source
# File lib/nccconfidence/data_filters.rb, line 9
def make_filter items
    items.map do |item|
        if item.class == Hash
            item.each do |key,value|
                break "#{key.to_s}[#{make_filter(value)}]"
            end
        else
            item.to_s #ensures symbols are correctly formated if and when used
        end
    end.join(',') 
end