store_as_int 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/store_as_int/base.rb +2 -3
- data/lib/store_as_int/exchange_rate.rb +10 -6
- data/lib/store_as_int/money.rb +9 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a93e82a38a478c106cad98a044e80f5f3c666b5663550ed6cf2f1ca7d4bbd6e
|
4
|
+
data.tar.gz: baf61d8158a6e1c0731c41ed952fb7a7364d4da69abeb22d1fe1b340a38ae939
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8518dd9376916f365322f0dadaa224fd806be19f2c2ce9a01f10b6d84e2338ec5815193d2130667de6be5d5b8a0c47573b2e0bf5f30362b8fcfabccefe2e9ab1
|
7
|
+
data.tar.gz: fcb677f202cd5a164de2eef575cc06a3747389319592f013f397cc88441d3da2a4e42ae4ea6a2a0f31e36960e3d2aa25b198de63c335ea9fda908e2ba9f8350f
|
data/lib/store_as_int/base.rb
CHANGED
@@ -1,7 +1,11 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
module StoreAsInt
|
2
|
+
unless defined?(StoreAsInt::Base)
|
3
|
+
require_relative './base'
|
4
|
+
end
|
5
|
+
|
6
|
+
class ExchangeRate < StoreAsInt::Base
|
7
|
+
BASE = 10000000000
|
8
|
+
DECIMALS = 4
|
9
|
+
SYM = '%'
|
10
|
+
end
|
7
11
|
end
|
data/lib/store_as_int/money.rb
CHANGED
@@ -1,7 +1,11 @@
|
|
1
|
-
|
1
|
+
module StoreAsInt
|
2
|
+
unless defined?(StoreAsInt::Base)
|
3
|
+
require_relative './base'
|
4
|
+
end
|
2
5
|
|
3
|
-
class
|
4
|
-
|
5
|
-
|
6
|
-
|
6
|
+
class Money < StoreAsInt::Base
|
7
|
+
BASE = 100
|
8
|
+
DECIMALS = 2
|
9
|
+
SYM = '$'
|
10
|
+
end
|
7
11
|
end
|