Nicholas Paul Johnson wrote:
> Hello all,
>
> As I'm learning Ruby, I've decided to write a few programs in Ruby to get
> a feel for the language.
>
> I've been a C programmer for a long time.  As such, I worry that I'm
> thinking too much like a C programmer, and not like a Ruby programmer...
>
> I've written it, and it works correctly when compared to my program
> written in C, but at its core is a large case-when-end statement.
> This is not 'sexy'.
>

Hi Nicholas,

Technically, case isn't as sexy in Ruby as switch is in C, but I think
many Rubyists would use it the way you have done in this example.

The rest of your code suggests to me that you are on the correct path.

Welcome here !


daz