I've got something which basically does this:

some_string.scan(/(whatever)/).each &do_stuff

where &do_stuff is a Proc.

currently there's a case/when that assigns different Procs to do_stuff
depending on the value of some_string.

what I want to do is something like this:

some_string.scan(/(whatever)/).each do_stuff

where do_stuff() is a method which figures out what Proc to return to
the each().

however, I can't seem to build a method which returns a Proc.

can it be done?

-- 
Giles Bowkett
http://www.gilesgoatboy.org
http://gilesbowkett.blogspot.com