I am new to Ruby, and to object oriented programming more generally.
I think what I want is exactly a Ruby translation of this. That is, I want to be able to initialize an instance of the class, and then as soon as a certain attribute is set call a method on it to convert it.
For example, say I had a Weather class with a temperature attribute that I would like converted from Fahrenheit to Celsius as soon as it is set. Here is the way I would like this to behave.
today = Weather.new
today.temp = 32
today.temp # => 0
How do I do that?