phonelib 0.4.2 → 0.4.3

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: 31b52617e633093ae7bfabe620e7e1cf03d7366f
4
- data.tar.gz: 06c9640f5d968daa6647d0711b6bc9ce3bdfd31b
3
+ metadata.gz: 600241b69c3b7265251dbf10a27bb30d91993532
4
+ data.tar.gz: 615d374f69715aac283827082f7523be1b09b093
5
5
  SHA512:
6
- metadata.gz: ca1800884ca5de35554071cfa6f2f958c084ac7dd104ac8e262549706a6f443bec3294fb7328f028fd26445b4cbf54a6e7be055d9fa9fd98ccb2e75d38dde602
7
- data.tar.gz: 7d583c8b898184aabe0efc2654ff52d979976943b704d1c9b24ea210db1182ee480fba12c4b0389780069f14f7862a2c05cd71e2acdc83219abc8a3989196b62
6
+ metadata.gz: 8872af94f450d20e9cf4328d40231c8571188db8720c84c60f8c3200bc4d52ae0190918e300b1a824aedac9debfd800c08c8f2928e91f40975782072d1e62af7
7
+ data.tar.gz: 67d32533b4522398ce681d8525406c2c6f56877d64f228d011aecc46e862fa47313b3cadf88b78a2b6bfe6d8588986e1934e89e53b1cafb267c3c05c768ea531
@@ -78,6 +78,13 @@ module Phonelib
78
78
  end
79
79
  end
80
80
 
81
+ # Returns the country code from the original phone number.
82
+ def country_code
83
+ if country_data = Phonelib.phone_data[country]
84
+ country_data[:country_code]
85
+ end
86
+ end
87
+
81
88
  # Returns whether a current parsed phone number is valid
82
89
  def valid?
83
90
  @data.select { |iso2, data| data[:valid].any? }.any?
@@ -1,5 +1,5 @@
1
1
  # :nodoc:
2
2
  module Phonelib
3
3
  # :nodoc:
4
- VERSION = '0.4.2'
4
+ VERSION = '0.4.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phonelib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vadim Senderovich
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-10 00:00:00.000000000 Z
11
+ date: 2015-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake