plata 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: f466fe3628907fb5f2b65c0263d8a6ab2f65e91a
4
- data.tar.gz: 4378f402235023964cd626262fdb1746cc4e4fe0
2
+ SHA256:
3
+ metadata.gz: 74f073764b3f0a79d93481b2c725fd0fcbaea92bc4dc766034f3ca05b262dac7
4
+ data.tar.gz: 0c8d5bc4ca800d7c2747c8a743179656b2aea7649b2904878cf94fe21d1dbdc0
5
5
  SHA512:
6
- metadata.gz: b89e8477a53d2a2c6e24bafa502a1a5193b4d93b67defefac82618873e26dc8c2123c9785bf9fcf8d5a03e375947ae40ea5e63f37937d05175a242520c6925c5
7
- data.tar.gz: e7253cab5cbcf5831b2ed465ea868ec1c26108974dd41cf75fa79b4c3be0d1885ed1135a3fd330df54da2cfcc7bd4b74ca66818bb106df5d71cd000d07d6b6db
6
+ metadata.gz: 67ecf89e51fea9f609347f8ec9343d34281c75b37287daa63294afb362ca59837a3ecf150da8d59967690ef72f0756d7b2d73187786c13a82476386283430e4d
7
+ data.tar.gz: f372af5cf3be38ca3b279ca4939c8c798f35fa2531203c93873288cb902f088a4b60f1af7402860d6d59ffb7b95e501f3940bcd6196ed8df533c21a3bfdbc557
@@ -5,6 +5,8 @@ en:
5
5
  thousand: 'thousand'
6
6
  conector:
7
7
  with: 'with'
8
+ and: 'and'
9
+ zero: 'zero'
8
10
  units:
9
11
  one: 'one'
10
12
  two: 'two'
@@ -51,4 +53,4 @@ en:
51
53
  bill: 'bill'
52
54
  trill: 'trill'
53
55
  cuatrill: 'cuatrill'
54
- quintill: 'quintill'
56
+ quintill: 'quintill'
@@ -6,6 +6,7 @@ es:
6
6
  conector:
7
7
  with: 'con'
8
8
  and: 'y'
9
+ zero: 'cero'
9
10
  units:
10
11
  one: 'uno'
11
12
  two: 'dos'
@@ -53,4 +54,4 @@ es:
53
54
  bill: 'billi'
54
55
  trill: 'trilli'
55
56
  cuatrill: 'cuatrilli'
56
- quintill: 'quintilli'
57
+ quintill: 'quintilli'
@@ -5,6 +5,8 @@ pt:
5
5
  thousand: 'mil'
6
6
  conector:
7
7
  with: 'com'
8
+ and: 'e'
9
+ zero: 'zero'
8
10
  units:
9
11
  one: 'um'
10
12
  two: 'dois'
@@ -51,4 +53,4 @@ pt:
51
53
  bill: 'bilhão'
52
54
  trill: 'trilhão'
53
55
  cuatrill: 'mil bilhões'
54
- quintill: 'quintilhões'
56
+ quintill: 'quintilhões'
data/lib/plata/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Plata
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/lib/plata.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # coding: utf-8
1
2
  require 'i18n'
2
3
  require "plata/version"
3
4
  I18n.load_path += Dir[File.join(File.expand_path(File.dirname(__FILE__)), 'locales', '*.yml')]
@@ -23,15 +24,14 @@ module Plata
23
24
  number, decimal = self.to_s.split(".")
24
25
  end
25
26
 
26
-
27
27
  def humanize
28
-
29
28
  words = []
30
29
 
31
30
  number = self.to_f
32
31
 
33
32
  if number.to_i == 0
34
33
  words << self.zero_string
34
+ decimal = number.to_s.split('.')[1]
35
35
  else
36
36
  decimal = number.to_s.split(".")[1].nil? ? 0 : number.to_s.split(".")[1].to_i
37
37
  number = number.to_s.split(".")[0]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ga6ix
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-03-16 00:00:00.000000000 Z
11
+ date: 2018-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -77,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
77
  version: '0'
78
78
  requirements: []
79
79
  rubyforge_project:
80
- rubygems_version: 2.4.5
80
+ rubygems_version: 2.7.7
81
81
  signing_key:
82
82
  specification_version: 4
83
83
  summary: Describe a number in words for English, Spanish and Portugues.