lib/monee/arithmetic.rb
# convert to cents if add or subtract
# dont convert to cents if multiply or divide
#
# @params operator [+, -, *, /]
# @return [Numeric]
convert to cents if add or subtract
dont convert to cents if multiply or divide
convert to cents if add or subtract dont convert to cents if multiply or divide
def choose_operand(operator, operand)
      if %i[+ -].include?(operator)
        operand.to_cents
      elsif %i[* /].include?(operator)
        operand
      end
    end
def choose_operand ( operator , operand ) if %i[ + - ] . include? ( operator ) operand . to_cents elsif %i[ * / ] . include? ( operator ) operand end end
convert to cents if add or subtract
dont convert to cents if multiply or divide
convert to cents if add or subtract dont convert to cents if multiply or divide
None
Numeric
operator
<not_specific>
operand
<not_specific>
params
None