istox 0.2.12 → 0.2.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/istox/helpers/formatter.rb +3 -1
- data/lib/istox/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4360b1a18d0d8d953665294d793c1f32e30b8fe87ea54635bb91ae3913666b4
|
4
|
+
data.tar.gz: bb9ea9f532da561d5cf6d527af3ee16e25a4952162a40fc5b0c991099caf82da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d99fffea40090ffa46dd6ed6baa0197d57a4a2a73a701996740a9083893324a2be2571630ab583eeb25be9e91dc66ee8cf3ea85fd386193e8a035f5a55881aa9
|
7
|
+
data.tar.gz: 163cce847ce4f4d83d81f4d47e8c6452f4cf1344b49fadeeac8f634be50cba292bd462047521b580c0650b17621b9b0a14a0efe526f88edd43fbfcfd22c1709e
|
@@ -13,7 +13,9 @@ module Istox
|
|
13
13
|
|
14
14
|
result = format("%.#{precision}f", input)
|
15
15
|
|
16
|
-
result.to_s.
|
16
|
+
parts = result.to_s.split('.')
|
17
|
+
parts[0].gsub!(/(\d)(?=(\d\d\d)+(?!\d))/, '\\1,')
|
18
|
+
parts.join('.')
|
17
19
|
end
|
18
20
|
|
19
21
|
# format a money, eg. 20000.134 > SGD 20,000.14, position can be :front or :behind, abs_num: whether to absolute the number
|
data/lib/istox/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: istox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Siong Leng
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-06
|
11
|
+
date: 2021-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: amazing_print
|