Update calculator.rb

Clean up method to be more in line with traditional Ruby styling.