module Converter::Operators

Private Instance Methods

format_result(result) click to toggle source
# File lib/converter/money/operators.rb, line 20
def format_result(result)
  "#{ result.is_a?(Integer) ? result : ("%.2f" % result.round(2)) } #{ currency }"
end
parse_operand(operand) click to toggle source
# File lib/converter/money/operators.rb, line 16
def parse_operand(operand)
  operand.is_a?(Money) ? operand.convert_to(currency).amount : operand
end