Sha256: 92b3537510a57f538ab44c0643aac50f451971776722fbef64d24c736a4c9990
Contents?: true
Size: 281 Bytes
Versions: 3
Compression:
Stored size: 281 Bytes
Contents
module Danconia Currency = Struct.new(:code, :symbol, :description, keyword_init: true) do def self.find code return code if code.is_a? Currency new Danconia.config.available_currencies.find { |c| c[:code] == code } || {code: code, symbol: '$'} end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
danconia-0.4.0 | lib/danconia/currency.rb |
danconia-0.3.1 | lib/danconia/currency.rb |
danconia-0.3.0 | lib/danconia/currency.rb |