From 613fe438ae0454bbedd5a2388aa893974e60a05c Mon Sep 17 00:00:00 2001 From: at-grandpa Date: Tue, 7 Nov 2017 01:13:27 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=B3=E3=83=B3=E3=82=B9=E3=83=88=E3=83=A9?= =?UTF-8?q?=E3=82=AF=E3=82=BF=E3=82=92=E8=A6=AA=E3=82=AF=E3=83=A9=E3=82=B9?= =?UTF-8?q?=E3=81=B8=E7=A7=BB=E5=8B=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- part01/src/money_package/dollar.cr | 3 --- part01/src/money_package/franc.cr | 3 --- part01/src/money_package/money.cr | 3 +++ 3 files changed, 3 insertions(+), 6 deletions(-) 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