Changes

Jump to: navigation, search

The Ruby case Statement

7 bytes removed, 01:58, 20 November 2007
no edit summary
&nbsp;&nbsp;&nbsp;else ''match7'': ''result7''<br>
end<br>
</pre>
There can be any number of ''when'' statements - basically as many as you need to fully compare the ''value'' in the ''case'' statement against the possible options (represented by ''match1'' through to ''match7'' in the above example) specified by the ''when'' statements. When a match is found the result is assigned to ''result''.

Navigation menu