From: Guillaume Marcais Date: 2004-05-26T01:59:06+09:00 Subject: Re: defining condititions Kansas, written by Kirk Haines, has such a conditions system to write SQL queries. You may want to check it out: http://enigo.com/projects/kansas/index.html Guillaume. On Tue, 2004-05-25 at 11:04, Florian Weber wrote: > hi! > > im trying to define a set of rules with ruby, however i cant find a more > ruby-like way to do so.. > > instead of doing something like > > my_set.add(NotNamedRule("orange").new) > my_set.add(HasPropertyRule("color").new) > my_set.add(OrRule(HasPropertyRule("size").new, > HasPropertyRule("weight").new)) > > (i know this is a horrible example. excuse the awful 'design'. its > justs to illustrate > what i not wanna have ; ) > > i wanna do something like > > my_set.rules = !name("orange") && hasProperty("color") && > (hasProperty("size") || hasProperty("weight")) > > can anybody think of a nice way to do this? > > thanks a lot for any feedback! > > ciao! > florian > >