istox 0.1.157.11.6 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -0
- data/.rubocop.yml +0 -0
- data/.solargraph.yml +0 -0
- data/CODE_OF_CONDUCT.md +0 -0
- data/Gemfile +0 -0
- data/README.md +0 -0
- data/Rakefile +0 -0
- data/lib/istox/constants/error.rb +0 -0
- data/lib/istox/helpers/common_helper.rb +2 -2
- data/lib/istox/helpers/f_math.rb +0 -0
- data/lib/istox/helpers/formatter.rb +9 -3
- data/lib/istox/helpers/graphql_client.rb +0 -0
- data/lib/istox/helpers/gruf_listener_hook.rb +0 -0
- data/lib/istox/helpers/my_open_struct.rb +0 -0
- data/lib/istox/helpers/order_book_price_time.rb +0 -0
- data/lib/istox/helpers/order_book_prorate.rb +0 -0
- data/lib/istox/helpers/rate_limit.rb +0 -0
- data/lib/istox/helpers/regex_helper.rb +0 -0
- data/lib/istox/helpers/result_handler.rb +0 -0
- data/lib/istox/helpers/vault.rb +0 -0
- data/lib/istox/interfaces/chainhub/transaction.rb +0 -0
- data/lib/istox/models/blockchain_receipt.rb +0 -0
- data/lib/istox/models/concerns/blockchain_receipt_query.rb +0 -0
- data/lib/istox/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32b60e5cea8c89edc2c9d9a9b4a9aaefeb026351d68ed6898b578f04213f7e81
|
4
|
+
data.tar.gz: e969dc0c25653d64d0de4173bd59178e3f2da8b080fe7db9d34f7c56b67bb791
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88109a86cc415878a19a461ed56252c42562fd44a40861eebe04f5a65a57c4b59df823851a047e59db49f78a5873e63eb99a27cf91f2e4a1c56646660b5f3e67
|
7
|
+
data.tar.gz: 9106e4ba0fd8bc5a965fcee3d3e78f1c6cf89ab5f2dcb1c3cbd7762913d6c6382b73c0173985c5f358aca6c58e697bfb78574c7c2c1b88af1b8a2702e89b5aea
|
data/.gitignore
CHANGED
File without changes
|
data/.rubocop.yml
CHANGED
File without changes
|
data/.solargraph.yml
CHANGED
File without changes
|
data/CODE_OF_CONDUCT.md
CHANGED
File without changes
|
data/Gemfile
CHANGED
File without changes
|
data/README.md
CHANGED
File without changes
|
data/Rakefile
CHANGED
File without changes
|
File without changes
|
data/lib/istox/helpers/f_math.rb
CHANGED
File without changes
|
@@ -17,10 +17,16 @@ 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:
|
21
|
-
precision = ::Istox::CommonHelper.get_currency_decimal(currency, precision)
|
20
|
+
def money(input, round_mode: :half_up, precision: nil, currency:, position: :front, abs_num: false, hide_currency: false)
|
21
|
+
# precision = ::Istox::CommonHelper.get_currency_decimal(currency, precision)
|
22
22
|
|
23
|
-
|
23
|
+
decimal_place = if precision.present?
|
24
|
+
precision
|
25
|
+
else
|
26
|
+
::Istox::CommonHelper.get_currency_decimal(currency)
|
27
|
+
end
|
28
|
+
|
29
|
+
result = number(input, round_mode: round_mode, precision: decimal_place, abs_num: abs_num)
|
24
30
|
|
25
31
|
return result if hide_currency
|
26
32
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/istox/helpers/vault.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
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.
|
4
|
+
version: 0.2.0
|
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-
|
11
|
+
date: 2021-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: amazing_print
|
@@ -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.0.6
|
550
550
|
signing_key:
|
551
551
|
specification_version: 4
|
552
552
|
summary: istox backend shared gem
|