latinum 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/lib/latinum/currencies/global.rb +8 -0
- data/lib/latinum/version.rb +1 -1
- data/test/test_bank.rb +3 -0
- metadata +2 -2
data/README.md
CHANGED
@@ -5,7 +5,7 @@ Latinum
|
|
5
5
|
* Copyright (C) 2012 Samuel G. D. Williams.
|
6
6
|
* Released under the MIT license.
|
7
7
|
|
8
|
-
Latinum is a framework for resource and currency calculations.
|
8
|
+
Latinum is a framework for resource and currency calculations.
|
9
9
|
|
10
10
|
Basic Usage
|
11
11
|
-----------
|
@@ -75,5 +75,13 @@ module Latinum
|
|
75
75
|
:description => 'Japanese Yen',
|
76
76
|
:formatter => Formatters::DecimalCurrencyFormatter
|
77
77
|
}
|
78
|
+
|
79
|
+
Global[:BTC] = {
|
80
|
+
:precision => 8,
|
81
|
+
:symbol => 'B⃦',
|
82
|
+
:name => 'BTC',
|
83
|
+
:description => 'Bitcoin',
|
84
|
+
:formatter => Formatters::DecimalCurrencyFormatter
|
85
|
+
}
|
78
86
|
end
|
79
87
|
end
|
data/lib/latinum/version.rb
CHANGED
data/test/test_bank.rb
CHANGED
@@ -22,6 +22,9 @@ class BankTest < Test::Unit::TestCase
|
|
22
22
|
|
23
23
|
resource = Latinum::Resource.new("-100", "NZD")
|
24
24
|
assert_equal "-$100.00 NZD", @bank.format(resource)
|
25
|
+
|
26
|
+
resource = Latinum::Resource.new("1.12345678", "BTC")
|
27
|
+
assert_equal "B⃦1.12000000 BTC", @bank.format(resource)
|
25
28
|
end
|
26
29
|
|
27
30
|
def test_exchange
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: latinum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-08-20 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description:
|
15
15
|
email: samuel.williams@oriontransfer.co.nz
|