routing switch implementation in Ruby.