indianize 1.2 → 1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/indianize.rb +4 -0
- 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: 617cd0f4b7b6b1f3774be36175016d6b18193e6581c7cda60ed88f7ed888251f
|
4
|
+
data.tar.gz: 61346c77645f4dc76c5cd91575ef1154b7ba20f9a42e7358b5005bbd6ed2dc09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b49228ddf43c29f2d76d5dba99a5eddf9325a496869a27ee08c8a11ec9707cf5172d02e9a37f9c94774ee8ab95933c63348e3e613c65223bf727535c9bad84f
|
7
|
+
data.tar.gz: 7562d9f725ba284b95c7664dd88e2b005370be1b587ed3835af97cf22d71cf40a65907e243b7312e2a6c43ecb0b4611fa96aa91b4cb97ff8c650f21eef6c8293
|
data/lib/indianize.rb
CHANGED
@@ -38,6 +38,10 @@ class Indianize
|
|
38
38
|
"₹ " + value.round.to_s.gsub(/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/, "\\1,")
|
39
39
|
end
|
40
40
|
|
41
|
+
def self.to_number_without_symbol(value)
|
42
|
+
value.round.to_s.gsub(/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/, "\\1,")
|
43
|
+
end
|
44
|
+
|
41
45
|
def self.to_words(value)
|
42
46
|
value = value.round
|
43
47
|
$reference_hash.each do |number, word|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: indianize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.3'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Himanshu G.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Convert numbers to Indian currency numbering system with seperators,
|
14
14
|
in numeric and alphabetical formats.
|