russian_phone 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +2 -0
- data/lib/russian_phone/number.rb +6 -2
- data/lib/russian_phone/version.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
data/lib/russian_phone/number.rb
CHANGED
|
@@ -93,12 +93,16 @@ module RussianPhone
|
|
|
93
93
|
end
|
|
94
94
|
end
|
|
95
95
|
|
|
96
|
+
def formatted_subscriber
|
|
97
|
+
format.join('-')
|
|
98
|
+
end
|
|
99
|
+
|
|
96
100
|
def full
|
|
97
101
|
if valid?
|
|
98
102
|
if free? && extra == ''
|
|
99
|
-
"8-#{city}-#{
|
|
103
|
+
"8-#{city}-#{formatted_subscriber}"
|
|
100
104
|
else
|
|
101
|
-
"+#{country} (#{city}) #{
|
|
105
|
+
"+#{country} (#{city}) #{formatted_subscriber}#{extra == '' ? '' : ' ' + extra}"
|
|
102
106
|
end
|
|
103
107
|
else
|
|
104
108
|
''
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: russian_phone
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.2
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2013-
|
|
12
|
+
date: 2013-03-22 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: mongoid
|