indianize 1.2 → 1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/indianize.rb +4 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 373cfa4e330e233278acbb679a2520bbf1088016463a4b5f5ebdb434f50255ff
4
- data.tar.gz: 8a0a9882b7c39062d370f412ab055ec61c619badef4cfb9a7ad87bc68126c8ed
3
+ metadata.gz: 617cd0f4b7b6b1f3774be36175016d6b18193e6581c7cda60ed88f7ed888251f
4
+ data.tar.gz: 61346c77645f4dc76c5cd91575ef1154b7ba20f9a42e7358b5005bbd6ed2dc09
5
5
  SHA512:
6
- metadata.gz: 2314aa92e81e973f243c0c5e3205a10614ce1a7b471bb43d73cd9a91d41f09e83410c405b4207ac7e4b27f133b410600e2eed171382ec1e796c5011a91b9b3dd
7
- data.tar.gz: 8480006f0bd5cfacafe0b8be88660399dd223dacb03af3485391a0bc1812e5f35ce155ee9057ea2e9b768a08841e1708b7936fd18154f4f1f0bda53c3d303453
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.2'
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: 2018-06-12 00:00:00.000000000 Z
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.