Sha256: c3457a77d628fa9388aa3ffc632036987d7fb2291bc68de4126b17085f83aedb
Contents?: true
Size: 339 Bytes
Versions: 5
Compression:
Stored size: 339 Bytes
Contents
# frozen_string_literal: true module Kaui class Base def self.to_money(amount, currency) if currency.present? begin return Money.from_amount(amount.to_f, currency) rescue StandardError => _e # Pass through end end Money.from_amount(amount.to_f, 'USD') end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
kaui-3.0.5 | app/models/kaui/base.rb |
kaui-3.0.4 | app/models/kaui/base.rb |
kaui-3.0.2 | app/models/kaui/base.rb |
kaui-2.2.1 | app/models/kaui/base.rb |
kaui-3.0.1 | app/models/kaui/base.rb |