module Amountable::Operations

Public Instance Methods

*(multiplier) click to toggle source
# File lib/amountable/operations.rb, line 14
def *(multiplier)
  value * multiplier
end
+(other_value) click to toggle source
# File lib/amountable/operations.rb, line 6
def +(other_value)
  value + other_value.to_money
end
-(other_value) click to toggle source
# File lib/amountable/operations.rb, line 10
def -(other_value)
  value - other_value.to_money
end
/(divisor) click to toggle source
# File lib/amountable/operations.rb, line 18
def /(divisor)
  value / divisor
end
to_money() click to toggle source
# File lib/amountable/operations.rb, line 22
def to_money
  value
end