Adding calculator in ruby methods