Makes change for configured currencies.
# Initialize your changemaker
# Defaults to USD
ChangeMaker.tap do |c|
# get denominations of 100 cents
c.fewest_number_of_coins(100)
end
# To change to another currency:
ChangeMaker.new(currency: :eur).tap do |c|
# or...
c.currency = :usd
end
This is more lines, but it allows for the wallet object and serialization to be decoupled.
Tests need to be updated for the above to pass.