numbers_and_words 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MGQyNDhhNTY5MjhjZTcyYjZjMjg0Y2RhNGVmYWJiNzAwZTU4NWZjNw==
4
+ MWMwNTZhNWNiNTg4YmY1ZTVjZTMyNzg3YzJlMmY5ZmUwM2JjNTc2YQ==
5
5
  data.tar.gz: !binary |-
6
- NzNkZTQ1YTUzMDRkMDI2MTY4MjMzZmU1ZDI0ZWZkNGU4MjBlMzFiYQ==
6
+ NTUyODhiODdlMjVkYjk3YTQxYzllM2JkZWU3YWE3MTdkY2JlZGNmYQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MDhjMTY3MTg4Mjc1NTBhNDczOTVlYjJhNWMxOWIyOTBjNDI4MjBhYmQxNWRl
10
- MGQ1YWMyNzJkMzBkMjAwYTdhMzcyZTAzMjExZGI5Yzg2ZmFiN2ExZTQ1Yjkw
11
- NjJmMzk5YmJkMzljOWRiMjMxYjEzZTdmZDgxNDJiYzQ4MzcyZjM=
9
+ ZDVlNTU0MTM0YTJjNGUzZmIyMWUwOGZjNGRjNjI0OWU2YmZhOTY4ZjU0MGI3
10
+ YjYxN2FhYzQ1NzRkOTAxOGExZTg3ZTNkZTlkNzJmYjA1ODFkMGI4YmRiN2Yw
11
+ NjVkYzQzZTBlODE1MGE4OTU1YmVjNDYzMGU2ZDhiMTIwNTFhZGQ=
12
12
  data.tar.gz: !binary |-
13
- NDdmN2Y5ODgyYzA4YjI0OWVlM2ZmNjgxMWEyODE5NGJmNDkyOWExZjJjZGZk
14
- YWQzMWIzN2MzOTUwNmJkYzkxNjhhZjBiODNmNGVmNDk4ZWFjYjM1YzZhOTI3
15
- ZGViYzkyNWMxOTU3MzY2ZDM2ZjlkY2Q0ODNhOWFhOWFjZWI0MzE=
13
+ NTdjMDA1YmVlNDZiMGViNWFlYzA0ZGUxZWUzNzUwZjEzZDJjOTNkYjY1ZGFm
14
+ NDUwNjk0ZDlhOWMxNTk0NDY0NDYzOWI3YTMwNmM1MDFkNjlmNTUwYTliNjRj
15
+ NzcwNzViZDA1NWNlZDRkZjQ3YzgyMjkyN2E4ZDFlYTQ2NGQ4NTA=
@@ -47,6 +47,10 @@ module NumbersAndWords
47
47
  self[2].to_i if 0 < self[2].to_i
48
48
  end
49
49
 
50
+ def round_hundred?
51
+ ones.nil? && tens.nil?
52
+ end
53
+
50
54
  def sub_capacity
51
55
  capacity_length % FIGURES_IN_CAPACITY
52
56
  end
@@ -12,7 +12,7 @@ module NumbersAndWords
12
12
  end
13
13
 
14
14
  def modify_or_leave hundreds
15
- hundreds = "#{hundreds} #{translations.union}" if active?
15
+ hundreds = "#{hundreds} #{translations.union}" if active? && !round_hundred?
16
16
  hundreds
17
17
  end
18
18
 
@@ -22,6 +22,10 @@ module NumbersAndWords
22
22
  @options[:hundreds_with_union]
23
23
  end
24
24
 
25
+ def round_hundred?
26
+ @strategy.language.figures.round_hundred?
27
+ end
28
+
25
29
  def translations
26
30
  @strategy.translations
27
31
  end
@@ -1,3 +1,3 @@
1
1
  module NumbersAndWords
2
- VERSION = '0.6.0'
2
+ VERSION = '0.6.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: numbers_and_words
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kirill Lazarev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-03-25 00:00:00.000000000 Z
11
+ date: 2013-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -195,6 +195,6 @@ requirements: []
195
195
  rubyforge_project:
196
196
  rubygems_version: 2.0.3
197
197
  signing_key:
198
- specification_version: 3
198
+ specification_version: 4
199
199
  summary: Convert numbers to words using I18N.
200
200
  test_files: []