Skip to content

Instantly share code, notes, and snippets.

@venkatd
Created February 19, 2016 17:01
Show Gist options
  • Save venkatd/f54d385e6425398133a9 to your computer and use it in GitHub Desktop.
Save venkatd/f54d385e6425398133a9 to your computer and use it in GitHub Desktop.
def apply_virtual_filters(operators)
# loop through operators (mix of virtual and real operators)
# if an operator is virtual, convert it to a real operator
# return new list of operators
end
FilterOperator = Struct.new(:type, :value)
def coerce_filters_to_operators(vals)
operators = build_filter_operators(vals)
apply_virtual_filters(operators)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment