Sha256: a8869a6fced7486d2b440ba946e6cd4f37c8937aef718db5b58fd8743acb3e91
Contents?: true
Size: 601 Bytes
Versions: 12
Compression:
Stored size: 601 Bytes
Contents
# Author:: Ondřej Ezr (mailto:oezr@msp.justice.cz) # Copyright:: Copyright (c) 2018 Ministry of Justice # License:: Distributes under license Open Source Licence pro Veřejnou Správu a Neziskový Sektor v.1 module AzaharaSchemaCurrency class CurrencyAttribute < AzaharaSchema::Attribute def initialize(model, name, type='currency', **options) super(model, name, type) @options = options end def currency_code_col @options[:currency_code_method] || 'currency_code' end def currency_code(entity) entity.try(currency_code_col) end end end
Version data entries
12 entries across 12 versions & 1 rubygems