I haven't looked into this in detail, but I've cobbled together this 
example of how you could get started:

http://www.rubular.com/r/qO6KRhE91b

-- 
Posted via http://www.ruby-forum.com/.