Permalink
Browse files

- Romanian special file

  • Loading branch information...
1 parent ff7e0dc commit cf11e22e423e960cc73b101f627ba71c7428704d @floere committed May 2, 2011
Showing with 6 additions and 34 deletions.
  1. +0 −1 lib/phony.rb
  2. +6 −1 lib/phony/countries.rb
  3. +0 −32 lib/phony/countries/romania.rb
View
@@ -26,7 +26,6 @@
require File.expand_path '../phony/countries/italy', __FILE__
require File.expand_path '../phony/countries/malaysia', __FILE__
require File.expand_path '../phony/countries/netherlands', __FILE__
-require File.expand_path '../phony/countries/romania', __FILE__
require File.expand_path '../phony/countries/south_korea', __FILE__
require File.expand_path '../phony/countries/sweden', __FILE__
require File.expand_path '../phony/countries/united_kingdom', __FILE__
View
@@ -65,7 +65,12 @@
# country '36' # Hungary, see special file.
# country '39' # Italy, see special file.
- # country '40' # Romania, see special file.
+ # Romania.
+ #
+ country '40', match(/^(112|800|90[036])\d+$/) >> split(3,3) | # Service
+ match(/^(7[1-8])\d+$/) >> split(3,4) | # Mobile
+ one_of('21', '31') >> split(3,4) | # Bucureşti
+ fixed(3) >> split(3,4) # 3-digit NDCs
# Switzerland.
#
@@ -1,32 +0,0 @@
-# Romanian phone numbers.
-#
-# http://en.wikipedia.org/wiki/Romania_telephone_area_codes
-#
-
-ndcs = [
- '21', # Bucureşti
- '31', # Bucureşti
-]
-mobile = [
- '71',
- '72',
- '73',
- '74',
- '75',
- '76',
- '77',
- '78',
-]
-service = [
- '112',
- '800',
- '900',
- '903',
- '906',
-]
-
-Phony.define do
- country '40', one_of(*service) >> split(3,3) |
- match(/^(7[1-8])\d*$/) >> split(3,4) |
- one_of('21', '31', :max_length => 3) >> split(3,4) # Bucureşti
-end

0 comments on commit cf11e22

Please sign in to comment.