/
turkmenistan.rb
73 lines (69 loc) · 865 Bytes
/
turkmenistan.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Turkmenistan
# https://www.numberingplans.com/?page=dialling&sub=areacodes
# https://www.numberingplans.com/?page=plans&sub=phonenr&alpha_2_input=TM
ndcs_with_6_subscriber_digits = %w(12)
ndcs_with_5_subscriber_digits = %w(
131
132
133
134
135
136
137
138
222
240
241
242
243
245
246
247
248
322
340
343
344
345
346
347
348
349
360
422
431
432
438
440
441
442
443
444
445
446
447
448
449
461
465
522
557
558
559
560
561
564
565
566
568
569
)
ndcs_with_4_subscriber_digits = %w(1392)
Phony.define do
country '993',
one_of(ndcs_with_4_subscriber_digits) >> trunk('8') >> split(4) |
one_of(ndcs_with_5_subscriber_digits) >> trunk('8') >> split(3,2) |
one_of(ndcs_with_6_subscriber_digits) >> trunk('8') >> split(3,3) |
one_of('6') >> trunk('8') >> split(3,4) | # mobile
fixed(3) >> trunk('8') >> split(3,2)
end