Not much explanations, just code and links. A Ruby range (x..y) is used in the CSV table to express an age range and ‘accumulate’ is used in the second version of the CSV table to gather a list of results instead of one single result.
The two examples are runnable with the OpenWFEru trunk (will be part of the 0.9.16 gem, promised), so there is some manual work :
svn checkout http://openwferu.rubyforge.org/svn/trunk/openwfe-ruby/lib owfelib
ruby -Iowfelib dec.rb
Here’s what the code looks like, it’s about determining which sales person is appropriate for a given customer :
Noticed that only one answer came back per customer profile ?
If you add the “accumulate” key word on top of the CSV table, you’ll end up with
adeslky, bronco, kerfelden
adeslky, bronco, korolev
espadas, ojiisan, korolev
which were just plain ‘first matches’.