istox 0.1.157.11.3 → 0.1.157.11.4
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: ad9280d41ae6de8ee941f75d80dac2ecacaf0a2e0d7d884f3d7e7839c07cbc68
|
4
|
+
data.tar.gz: e17f4f264ec1c0bc00232c32996ef7e63ab7ae38b0492201556bfbc86371e541
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b48333122a8469840cd7a2d3ac308aa0a864af99c01950d568b1b99cce6ea9628f043c9845e5fe86fed83e9393a767bbda022c33a6e9316866cdf6ad756c9679
|
7
|
+
data.tar.gz: 692621c761f6df109524252d9fccf9f798a48f98ba7032b1fd6401ab875586b5e36641d7df57674fe706549eeb76c845302c1e371ed7d4f9342bce9dad2ebc49
|
@@ -17,11 +17,13 @@ module Istox
|
|
17
17
|
end
|
18
18
|
|
19
19
|
# format a money, eg. 20000.134 > SGD 20,000.14, position can be :front or :behind, abs_num: whether to absolute the number
|
20
|
-
def money(input, round_mode: :half_up, precision: 2, currency:, position: :front, abs_num: false)
|
20
|
+
def money(input, round_mode: :half_up, precision: 2, currency:, position: :front, abs_num: false, hide_currency: false)
|
21
21
|
precision = 0 if currency&.downcase == 'jpy'
|
22
22
|
|
23
23
|
result = number(input, round_mode: round_mode, precision: precision, abs_num: abs_num)
|
24
24
|
|
25
|
+
return result if hide_currency
|
26
|
+
|
25
27
|
return currency + ' ' + result if position == :front
|
26
28
|
|
27
29
|
result + ' ' + currency
|
data/lib/istox/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: istox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.157.11.
|
4
|
+
version: 0.1.157.11.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Siong Leng
|
@@ -546,7 +546,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
546
546
|
- !ruby/object:Gem::Version
|
547
547
|
version: '0'
|
548
548
|
requirements: []
|
549
|
-
rubygems_version: 3.
|
549
|
+
rubygems_version: 3.2.11
|
550
550
|
signing_key:
|
551
551
|
specification_version: 4
|
552
552
|
summary: istox backend shared gem
|