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 CHANGED
@@ -45,6 +45,8 @@ Or install it yourself as:
45
45
  => "906"
46
46
  # phone.subscriber
47
47
  => "1111111"
48
+ # phone.formatted_subscriber
49
+ => "111-11-11"
48
50
  # phone.full
49
51
  => "+7 (906) 111-11-11"
50
52
  # phone.cell?
@@ -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}-#{format.join('-')}"
103
+ "8-#{city}-#{formatted_subscriber}"
100
104
  else
101
- "+#{country} (#{city}) #{format.join('-')}#{extra == '' ? '' : ' ' + extra}"
105
+ "+#{country} (#{city}) #{formatted_subscriber}#{extra == '' ? '' : ' ' + extra}"
102
106
  end
103
107
  else
104
108
  ''
@@ -1,3 +1,3 @@
1
1
  module RussianPhone
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
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.1
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-02-05 00:00:00.000000000 Z
12
+ date: 2013-03-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mongoid