telephone_number 1.1.0 → 1.1.1

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
  SHA1:
3
- metadata.gz: edf6c348d7ca4077fb19305cc3b4580481dee72c
4
- data.tar.gz: 657ed55b06282ba3e7bec130b9a1fe24cdbc2f31
3
+ metadata.gz: 8ec98740cf5ff4f512dc0e165242a9993a0e760a
4
+ data.tar.gz: fcaf6262df680a30f38ecec2f1bf0489aaa20232
5
5
  SHA512:
6
- metadata.gz: 63c9844763b23a0580986b06aab2104101fe2e4e104987ef9a39e1651732a3e1aadd95883e5251cef58b5765800eb7b5fba8468b0d6dfe1e9172b676c2bbdab2
7
- data.tar.gz: 599e9f9d400986eb1bf0f990c7c3b839d11b7bb4e050695892bd1dd59ca282d53893253d51ecc73b6fd5293e890aeb6038318597a015ee7c546d7efa5914057e
6
+ metadata.gz: 6f4fc7c229ea6ee79531eaff827dc40344c89f6ef5b708ecc73e214001db0e2f91567fdc208850b576a9cf5e2d4966b74dcf29dd80b9be8deef19856652dbeb0
7
+ data.tar.gz: 414ad7feb3095ea4d14cfd6e74591d344f00c6dea735dd2f198f554a119adc4ee77ac4022a9702cc67e46a07867fd355ebcab890edc91e96dd0b23602d72d683
@@ -14,35 +14,35 @@ module TelephoneNumber
14
14
  extend ClassMethods
15
15
 
16
16
  # allows users to override the default data
17
- @@override_file = nil
17
+ @override_file = nil
18
+
19
+ # allows users to provide a default format pattern
20
+ @default_format_pattern = nil
21
+
22
+ # allows users to provide a default format string
23
+ @default_format_string = nil
18
24
 
19
25
  def self.override_file=(file_name)
20
- @@override_file = file_name
26
+ @override_file = file_name
21
27
  end
22
28
 
23
29
  def self.override_file
24
- @@override_file
30
+ @override_file
25
31
  end
26
32
 
27
- # allows users to provide a default format string
28
- @@default_format_string = nil
29
-
30
33
  def self.default_format_string=(format_string)
31
- @@default_format_string = format_string
34
+ @default_format_string = format_string
32
35
  end
33
36
 
34
37
  def self.default_format_string
35
- @@default_format_string
38
+ @default_format_string
36
39
  end
37
40
 
38
- # allows users to provide a default format pattern
39
- @@default_format_pattern = nil
40
-
41
41
  def self.default_format_pattern=(format_string)
42
- @@default_format_pattern = Regexp.new(format_string)
42
+ @default_format_pattern = Regexp.new(format_string)
43
43
  end
44
44
 
45
45
  def self.default_format_pattern
46
- @@default_format_pattern
46
+ @default_format_pattern
47
47
  end
48
48
  end
@@ -96,7 +96,8 @@ module TelephoneNumber
96
96
  country_data[PhoneData::COUNTRY_CODE] == PhoneData.phone_data[self.country.to_sym][PhoneData::COUNTRY_CODE] \
97
97
  && country_data[PhoneData::MAIN_COUNTRY_FOR_CODE] == 'true'
98
98
  end
99
- detect_format(parent_country_code[0])
99
+
100
+ detect_format(parent_country_code[0]) if parent_country_code
100
101
  end
101
102
 
102
103
  def detect_format(country_code)
@@ -30,7 +30,7 @@ module TelephoneNumber
30
30
  attr_reader :country_data, :country
31
31
 
32
32
  def self.phone_data
33
- @@phone_data ||= load_data
33
+ @phone_data ||= load_data
34
34
  end
35
35
 
36
36
  def self.load_data
@@ -1,3 +1,3 @@
1
1
  module TelephoneNumber
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telephone_number
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - MOBI Wireless Management
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-12 00:00:00.000000000 Z
11
+ date: 2017-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler