diff --git a/part01/src/money_package/dollar.cr b/part01/src/money_package/dollar.cr index c4e97b0..7cdafb6 100644 --- a/part01/src/money_package/dollar.cr +++ b/part01/src/money_package/dollar.cr @@ -1,8 +1,5 @@ module MoneyPackage class Dollar < MoneyPackage::Money - def initialize(@amount : Int32, @currency : String) - end - def times(multiplier : Int32) Money.dollar(@amount * multiplier) end diff --git a/part01/src/money_package/franc.cr b/part01/src/money_package/franc.cr index f479340..22992d5 100644 --- a/part01/src/money_package/franc.cr +++ b/part01/src/money_package/franc.cr @@ -1,8 +1,5 @@ module MoneyPackage class Franc < MoneyPackage::Money - def initialize(@amount : Int32, @currency : String) - end - def times(multiplier : Int32) Money.franc(@amount * multiplier) end diff --git a/part01/src/money_package/money.cr b/part01/src/money_package/money.cr index 2bcfb6e..9eebe05 100644 --- a/part01/src/money_package/money.cr +++ b/part01/src/money_package/money.cr @@ -1,5 +1,8 @@ module MoneyPackage abstract class Money + def initialize(@amount : Int32, @currency : String) + end + def currency @currency end