nobu.nokada / softhome.net writes:

>   module Temp
>     @farenheit = Hash.new do |h, c|
>       h[c] = c * 9 / 5 + 32
>     end
>     class << self
>       attr_reader :farenheit
>     end
>   end
> 
>   Temp.farenheit[100] # => 212
>   Temp.farenheit[200] # => 392

That is going on my list of FAQ additions. Not that anyone's asked the
question more than once, but it is just too neat.


Dave