On Thursday 18 November 2010 11:15:15 flebber wrote:
> Really interested to now what type of case statement or for each
> satement you would use with a block like below.
Sorry.  I don't see where a foreach falls in there.  If your options are 
known, then you either a hash or a case would suffice.  But again, it has 
nothing to do with ruby. 

event_handler = { :event => lambda { action } }

  or 

case event
  when event
    << do something >>

I would prefer number 2 if you have 4 options, to be honest....