Sha256: d1fff23fe47fda12dc1bba413849afbf44403e3c47f8964c9555c02f4045d3c2
Contents?: true
Size: 202 Bytes
Versions: 2
Compression:
Stored size: 202 Bytes
Contents
module CrystalApi class Money < ::Money def self.from_json(hash) attrs = hash.fetch('money', {}) ::Money.new(attrs.fetch('cents', 0), attrs.fetch('currency', 'USD')) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
crystal_api-0.1.0 | lib/crystal_api/money.rb |
crystal_api-0.0.1 | lib/crystal_api/money.rb |