Add price conversion

This commit is contained in:
adam.harbas@a-net.ba
2016-01-04 11:14:16 +01:00
parent 6b61afebc0
commit c2cd011ffb
2 changed files with 11 additions and 1 deletions

View File

@@ -27,4 +27,6 @@ module RibicaConfig
# larry-price.com/blog/2014/03/18/connecting-to-the-trello-api/
TRELLO_MEMBER_TOKEN = "(enter token here)"
TRELLO_BOARD_NAME = "FqDO1eFL"
BAM_TO_EURO_CONVERSION_RATE = 0.51
end

View File

@@ -2,4 +2,12 @@ class Helper
def self.money(amount)
sprintf('%.2f KM', amount.to_f)
end
end
def self.get_bam_to_euro_conversion_rate
RibicaConfig.BAM_TO_EURO_CONVERSION_RATE
end
def self.bam_to_euro(amount)
self.get_bam_to_euro_conversion_rate * amount
end
end