ruby calculator, basic and advanced computation