SetBuilder is a library for:
- Describing a set of constraints in a simple data structure that can easily be serialized
- Presenting that data structure in natural language
- Performing the set of constraints as a SQL query
The following Set describes a group of people:
[[:awesome],
[:attended, "school"],
[:died, :not],
[:name, {:is => "Jerome"}]]
SetBuilder can render this Set in plain English:
[Everyone] who is awesome, who attended school, who has not died, and whose name is Jerome.
It can also generate a NamedScope on an ActiveRecord model to fetch the people who fit in this set.
Ruby bundle exec rake test
Javascript jspec run --browsers ff
Copyright (c) 2010, 2015 Bob Lail, released under the MIT license