Sha256: 15ffc1679149b5c501892a91be751b503104527762f620a03a7a6343c25cc3a3

Contents?: true

Size: 213 Bytes

Versions: 7

Compression:

Stored size: 213 Bytes

Contents

class Kaui::Base

  def self.to_money(amount, currency)
    begin
      return Money.new(amount.to_f * 100, currency)
    rescue => _
    end if currency.present?
    Money.new(amount.to_f * 100, 'USD')
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
kaui-1.3.0 app/models/kaui/base.rb
kaui-1.2.0 app/models/kaui/base.rb
kaui-1.1.0 app/models/kaui/base.rb
kaui-1.0.0 app/models/kaui/base.rb
kaui-0.16.2 app/models/kaui/base.rb
kaui-0.16.1 app/models/kaui/base.rb
kaui-0.16.0 app/models/kaui/base.rb