Sha256: 5dc1135147ee7447b3a539c4c2abbce54379af977eda652216decc4672e08bd3
Contents?: true
Size: 451 Bytes
Versions: 1
Compression:
Stored size: 451 Bytes
Contents
# frozen_string_literal: true require 'bigdecimal' module Sasin class Converter RATE = 70_000_000 # This is 1 sasin in PLN, but for simplicity we adopt it as a universal rate def self.convert(param) coerced_param = if param.is_a?(BigDecimal) param else BigDecimal(param.to_s) end (coerced_param / RATE).to_f.round(25) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sasin-0.1.0 | lib/sasin/converter.rb |