Softwire interview question

Implement a unit converter in ruby