plata 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/locales/en.plata.yml +3 -1
- data/lib/locales/es.plata.yml +2 -1
- data/lib/locales/pt.plata.yml +3 -1
- data/lib/plata/version.rb +1 -1
- data/lib/plata.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 74f073764b3f0a79d93481b2c725fd0fcbaea92bc4dc766034f3ca05b262dac7
|
4
|
+
data.tar.gz: 0c8d5bc4ca800d7c2747c8a743179656b2aea7649b2904878cf94fe21d1dbdc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67ecf89e51fea9f609347f8ec9343d34281c75b37287daa63294afb362ca59837a3ecf150da8d59967690ef72f0756d7b2d73187786c13a82476386283430e4d
|
7
|
+
data.tar.gz: f372af5cf3be38ca3b279ca4939c8c798f35fa2531203c93873288cb902f088a4b60f1af7402860d6d59ffb7b95e501f3940bcd6196ed8df533c21a3bfdbc557
|
data/lib/locales/en.plata.yml
CHANGED
data/lib/locales/es.plata.yml
CHANGED
data/lib/locales/pt.plata.yml
CHANGED
data/lib/plata/version.rb
CHANGED
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.
|
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:
|
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.
|
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.
|