Sha256: cda1c99c374b87512b4412c6e8517484720b5bb55a62b2589129785c99718ebe
Contents?: true
Size: 588 Bytes
Versions: 24
Compression:
Stored size: 588 Bytes
Contents
module RedmineCrm class Currency module Loader DATA_PATH = File.expand_path("../../../../config", __FILE__) # Loads and returns the currencies stored in JSON files # in the config directory. # # @return [Hash] def load_currencies parse_currency_file('currency_iso.json') end private def parse_currency_file(filename) json = File.read("#{DATA_PATH}/#{filename}") json.force_encoding(::Encoding::UTF_8) if defined?(::Encoding) JSON.parse(json, symbolize_names: true) end end end end
Version data entries
24 entries across 24 versions & 1 rubygems