numbers_and_words 0.11.8 → 0.11.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ea9d33b86d78e18e90469a44a76b104680aab00f84a7adc231c6b39dd6c658be
4
- data.tar.gz: 35fc2539c95700e447913526265a62d43006b8e963ee9bf61324fd1f0c1d4075
3
+ metadata.gz: a565a7b412e3ce37990ada8ada522f55e08db8d24576dcab13afee2f70b3a5c7
4
+ data.tar.gz: 076ba08de6db6213ee609389da12aa956456963df17906fd1b8175c39edc4f14
5
5
  SHA512:
6
- metadata.gz: a1b10a1a58c9db1e44d43bdeefe11c4f9ccb1e7ada04fae531edcc1d85055eb51b3c0ce1ed9086fcdc144387c1d45c9762263433e0187c3d1d9d73426bd9c9a5
7
- data.tar.gz: 743962ff8a5e9b2406e609da7be0b35d246592ab2c108b5469c9682f1887c1b59ca1bb77b3304f777be339edaa60077621cdb79e5a6e4f0440971f9e1074fd60
6
+ metadata.gz: 749dc5a65e4d482918cdc7a72f5c66436e5e26bce3c9ec217e8b57e1dd9f2364282ef673b05b4be4464a58ffe7a561b719fbd2b46c5d5e3b54979629044b0234
7
+ data.tar.gz: eadf0605cd88d2e97bafdf6dea1ad1f8e1333d9a8b127bf906431ec53096a9f52cfaa14afb8ac33dc98b97fc283b0953c944073b33e2a2ac9524d77ef66d881c
@@ -4,7 +4,7 @@ require 'numbers_and_words/helper_classes/array_extensions/helpers'
4
4
 
5
5
  module NumbersAndWords
6
6
  class FiguresArray < Array
7
- include ArrayExtensions::Helpers
7
+ Array.include ArrayExtensions::Helpers
8
8
 
9
9
  def to_words(options = {})
10
10
  local_language { Strategies.figures_converter.new(self, options).run }
@@ -14,8 +14,8 @@ module NumbersAndWords
14
14
  super.to_figures
15
15
  end
16
16
 
17
- def local_language
18
- ::I18n.with_locale(I18n.local_language) { yield }
17
+ def local_language(&block)
18
+ ::I18n.with_locale(I18n.local_language, &block)
19
19
  end
20
20
  end
21
21
  end
@@ -8,8 +8,8 @@ module NumbersAndWords
8
8
  local_language { Strategies.array_joiner.new(to_a, options).run }
9
9
  end
10
10
 
11
- def local_language
12
- ::I18n.with_locale(I18n.local_language) { yield }
11
+ def local_language(&block)
12
+ ::I18n.with_locale(I18n.local_language, &block)
13
13
  end
14
14
  end
15
15
  end
@@ -25,8 +25,8 @@ module NumbersAndWords
25
25
 
26
26
  private
27
27
 
28
- def around
29
- decorator.run { yield }
28
+ def around(&block)
29
+ decorator.run(&block)
30
30
  end
31
31
  end
32
32
  end
@@ -34,7 +34,7 @@ module NumbersAndWords
34
34
  nil
35
35
  end
36
36
 
37
- def respond_to_missing?(method_name, include_private = false)
37
+ def respond_to_missing?(method_name, include_private: false)
38
38
  Object.const_get(proxy_class_name(method_name)) || super
39
39
  end
40
40
 
@@ -12,7 +12,7 @@ module NumbersAndWords
12
12
 
13
13
  def result(type)
14
14
  @type = type
15
- MEGS_TYPE != type ? check_simple_numbers : check_megs_numbers
15
+ MEGS_TYPE == type ? check_megs_numbers : check_simple_numbers
16
16
  end
17
17
 
18
18
  private
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NumbersAndWords
4
- VERSION = '0.11.8'
4
+ VERSION = '0.11.9'
5
5
  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.11.8
4
+ version: 0.11.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kirill Lazarev
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-06 00:00:00.000000000 Z
11
+ date: 2021-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -259,7 +259,7 @@ homepage: http://github.com/kslazarev/numbers_and_words
259
259
  licenses:
260
260
  - MIT
261
261
  metadata: {}
262
- post_install_message:
262
+ post_install_message:
263
263
  rdoc_options: []
264
264
  require_paths:
265
265
  - lib
@@ -274,8 +274,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
274
274
  - !ruby/object:Gem::Version
275
275
  version: '0'
276
276
  requirements: []
277
- rubygems_version: 3.1.4
278
- signing_key:
277
+ rubygems_version: 3.2.4
278
+ signing_key:
279
279
  specification_version: 4
280
280
  summary: Spell out numbers in several languages
281
281
  test_files: []