kenyacodes 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,29 @@
1
+
2
+ <?xml version="1.0" encoding="iso-8859-1"?>
3
+ <!DOCTYPE html
4
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
5
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
6
+
7
+ <!--
8
+
9
+ Classes
10
+
11
+ -->
12
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
13
+ <head>
14
+ <title>Classes</title>
15
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
16
+ <link rel="stylesheet" href="rdoc-style.css" type="text/css" />
17
+ <base target="docwin" />
18
+ </head>
19
+ <body>
20
+ <div id="index">
21
+ <h1 class="section-bar">Classes</h1>
22
+ <div id="index-entries">
23
+ <a href="classes/Kenyacodes.html">Kenyacodes</a><br />
24
+ <a href="classes/Kenyacodes/Postcodes.html">Kenyacodes::Postcodes</a><br />
25
+ <a href="classes/KenyacodesTest.html">KenyacodesTest</a><br />
26
+ </div>
27
+ </div>
28
+ </body>
29
+ </html>
@@ -0,0 +1,28 @@
1
+
2
+ <?xml version="1.0" encoding="iso-8859-1"?>
3
+ <!DOCTYPE html
4
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
5
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
6
+
7
+ <!--
8
+
9
+ Files
10
+
11
+ -->
12
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
13
+ <head>
14
+ <title>Files</title>
15
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
16
+ <link rel="stylesheet" href="rdoc-style.css" type="text/css" />
17
+ <base target="docwin" />
18
+ </head>
19
+ <body>
20
+ <div id="index">
21
+ <h1 class="section-bar">Files</h1>
22
+ <div id="index-entries">
23
+ <a href="files/lib/kenyacodes_rb.html">lib/kenyacodes.rb</a><br />
24
+ <a href="files/test/test_kenyacodes_rb.html">test/test_kenyacodes.rb</a><br />
25
+ </div>
26
+ </div>
27
+ </body>
28
+ </html>
@@ -0,0 +1,34 @@
1
+
2
+ <?xml version="1.0" encoding="iso-8859-1"?>
3
+ <!DOCTYPE html
4
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
5
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
6
+
7
+ <!--
8
+
9
+ Methods
10
+
11
+ -->
12
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
13
+ <head>
14
+ <title>Methods</title>
15
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
16
+ <link rel="stylesheet" href="rdoc-style.css" type="text/css" />
17
+ <base target="docwin" />
18
+ </head>
19
+ <body>
20
+ <div id="index">
21
+ <h1 class="section-bar">Methods</h1>
22
+ <div id="index-entries">
23
+ <a href="classes/Kenyacodes/Postcodes.html#M000007">list_postoffices (Kenyacodes::Postcodes)</a><br />
24
+ <a href="classes/Kenyacodes/Postcodes.html#M000006">number_of_postoffices (Kenyacodes::Postcodes)</a><br />
25
+ <a href="classes/Kenyacodes/Postcodes.html#M000004">postcode (Kenyacodes::Postcodes)</a><br />
26
+ <a href="classes/Kenyacodes/Postcodes.html#M000005">postoffice (Kenyacodes::Postcodes)</a><br />
27
+ <a href="classes/KenyacodesTest.html#M000003">test_othercodes (KenyacodesTest)</a><br />
28
+ <a href="classes/KenyacodesTest.html#M000002">test_postcode (KenyacodesTest)</a><br />
29
+ <a href="classes/KenyacodesTest.html#M000001">test_postoffice (KenyacodesTest)</a><br />
30
+ <a href="classes/Kenyacodes/Postcodes.html#M000008">yml_output (Kenyacodes::Postcodes)</a><br />
31
+ </div>
32
+ </div>
33
+ </body>
34
+ </html>
@@ -0,0 +1,24 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
5
+
6
+ <!--
7
+
8
+ RDoc Documentation
9
+
10
+ -->
11
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
12
+ <head>
13
+ <title>RDoc Documentation</title>
14
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
15
+ </head>
16
+ <frameset rows="20%, 80%">
17
+ <frameset cols="25%,35%,45%">
18
+ <frame src="fr_file_index.html" title="Files" name="Files" />
19
+ <frame src="fr_class_index.html" name="Classes" />
20
+ <frame src="fr_method_index.html" name="Methods" />
21
+ </frameset>
22
+ <frame src="files/lib/kenyacodes_rb.html" name="docwin" />
23
+ </frameset>
24
+ </html>
@@ -0,0 +1,208 @@
1
+
2
+ body {
3
+ font-family: Verdana,Arial,Helvetica,sans-serif;
4
+ font-size: 90%;
5
+ margin: 0;
6
+ margin-left: 40px;
7
+ padding: 0;
8
+ background: white;
9
+ }
10
+
11
+ h1,h2,h3,h4 { margin: 0; color: #efefef; background: transparent; }
12
+ h1 { font-size: 150%; }
13
+ h2,h3,h4 { margin-top: 1em; }
14
+
15
+ a { background: #eef; color: #039; text-decoration: none; }
16
+ a:hover { background: #039; color: #eef; }
17
+
18
+ /* Override the base stylesheet's Anchor inside a table cell */
19
+ td > a {
20
+ background: transparent;
21
+ color: #039;
22
+ text-decoration: none;
23
+ }
24
+
25
+ /* and inside a section title */
26
+ .section-title > a {
27
+ background: transparent;
28
+ color: #eee;
29
+ text-decoration: none;
30
+ }
31
+
32
+ /* === Structural elements =================================== */
33
+
34
+ div#index {
35
+ margin: 0;
36
+ margin-left: -40px;
37
+ padding: 0;
38
+ font-size: 90%;
39
+ }
40
+
41
+
42
+ div#index a {
43
+ margin-left: 0.7em;
44
+ }
45
+
46
+ div#index .section-bar {
47
+ margin-left: 0px;
48
+ padding-left: 0.7em;
49
+ background: #ccc;
50
+ font-size: small;
51
+ }
52
+
53
+
54
+ div#classHeader, div#fileHeader {
55
+ width: auto;
56
+ color: white;
57
+ padding: 0.5em 1.5em 0.5em 1.5em;
58
+ margin: 0;
59
+ margin-left: -40px;
60
+ border-bottom: 3px solid #006;
61
+ }
62
+
63
+ div#classHeader a, div#fileHeader a {
64
+ background: inherit;
65
+ color: white;
66
+ }
67
+
68
+ div#classHeader td, div#fileHeader td {
69
+ background: inherit;
70
+ color: white;
71
+ }
72
+
73
+
74
+ div#fileHeader {
75
+ background: #057;
76
+ }
77
+
78
+ div#classHeader {
79
+ background: #048;
80
+ }
81
+
82
+
83
+ .class-name-in-header {
84
+ font-size: 180%;
85
+ font-weight: bold;
86
+ }
87
+
88
+
89
+ div#bodyContent {
90
+ padding: 0 1.5em 0 1.5em;
91
+ }
92
+
93
+ div#description {
94
+ padding: 0.5em 1.5em;
95
+ background: #efefef;
96
+ border: 1px dotted #999;
97
+ }
98
+
99
+ div#description h1,h2,h3,h4,h5,h6 {
100
+ color: #125;;
101
+ background: transparent;
102
+ }
103
+
104
+ div#validator-badges {
105
+ text-align: center;
106
+ }
107
+ div#validator-badges img { border: 0; }
108
+
109
+ div#copyright {
110
+ color: #333;
111
+ background: #efefef;
112
+ font: 0.75em sans-serif;
113
+ margin-top: 5em;
114
+ margin-bottom: 0;
115
+ padding: 0.5em 2em;
116
+ }
117
+
118
+
119
+ /* === Classes =================================== */
120
+
121
+ table.header-table {
122
+ color: white;
123
+ font-size: small;
124
+ }
125
+
126
+ .type-note {
127
+ font-size: small;
128
+ color: #DEDEDE;
129
+ }
130
+
131
+ .xxsection-bar {
132
+ background: #eee;
133
+ color: #333;
134
+ padding: 3px;
135
+ }
136
+
137
+ .section-bar {
138
+ color: #333;
139
+ border-bottom: 1px solid #999;
140
+ margin-left: -20px;
141
+ }
142
+
143
+
144
+ .section-title {
145
+ background: #79a;
146
+ color: #eee;
147
+ padding: 3px;
148
+ margin-top: 2em;
149
+ margin-left: -30px;
150
+ border: 1px solid #999;
151
+ }
152
+
153
+ .top-aligned-row { vertical-align: top }
154
+ .bottom-aligned-row { vertical-align: bottom }
155
+
156
+ /* --- Context section classes ----------------------- */
157
+
158
+ .context-row { }
159
+ .context-item-name { font-family: monospace; font-weight: bold; color: black; }
160
+ .context-item-value { font-size: small; color: #448; }
161
+ .context-item-desc { color: #333; padding-left: 2em; }
162
+
163
+ /* --- Method classes -------------------------- */
164
+ .method-detail {
165
+ background: #efefef;
166
+ padding: 0;
167
+ margin-top: 0.5em;
168
+ margin-bottom: 1em;
169
+ border: 1px dotted #ccc;
170
+ }
171
+ .method-heading {
172
+ color: black;
173
+ background: #ccc;
174
+ border-bottom: 1px solid #666;
175
+ padding: 0.2em 0.5em 0 0.5em;
176
+ }
177
+ .method-signature { color: black; background: inherit; }
178
+ .method-name { font-weight: bold; }
179
+ .method-args { font-style: italic; }
180
+ .method-description { padding: 0 0.5em 0 0.5em; }
181
+
182
+ /* --- Source code sections -------------------- */
183
+
184
+ a.source-toggle { font-size: 90%; }
185
+ div.method-source-code {
186
+ background: #262626;
187
+ color: #ffdead;
188
+ margin: 1em;
189
+ padding: 0.5em;
190
+ border: 1px dashed #999;
191
+ overflow: hidden;
192
+ }
193
+
194
+ div.method-source-code pre { color: #ffdead; overflow: hidden; }
195
+
196
+ /* --- Ruby keyword styles --------------------- */
197
+
198
+ .standalone-code { background: #221111; color: #ffdead; overflow: hidden; }
199
+
200
+ .ruby-constant { color: #7fffd4; background: transparent; }
201
+ .ruby-keyword { color: #00ffff; background: transparent; }
202
+ .ruby-ivar { color: #eedd82; background: transparent; }
203
+ .ruby-operator { color: #00ffee; background: transparent; }
204
+ .ruby-identifier { color: #ffdead; background: transparent; }
205
+ .ruby-node { color: #ffa07a; background: transparent; }
206
+ .ruby-comment { color: #b22222; font-weight: bold; background: transparent; }
207
+ .ruby-regexp { color: #ffa07a; background: transparent; }
208
+ .ruby-value { color: #7fffd4; background: transparent; }
@@ -0,0 +1,14 @@
1
+ require 'rubygems'
2
+
3
+ spec = Gem::Specification.new do |s|
4
+ s.name = 'kenyacodes'
5
+ s.version = '1.0.0'
6
+ s.summary = "A library of Kenyan standard codes. This release contains postoffice codes for 670 postoffices and towns."
7
+ s.files = Dir.glob("**/**/**")
8
+ s.test_files = Dir.glob("test/*_test.rb")
9
+ s.autorequire = 'kenyacodes'
10
+ s.author = "george githinji"
11
+ s.email = "georgkam@gmail.com"
12
+ s.has_rdoc = true
13
+ s.required_ruby_version = '>= 1.8.2'
14
+ end
@@ -0,0 +1,232 @@
1
+
2
+ $:.unshift File.dirname(__FILE__)
3
+
4
+ module Kenyacodes
5
+ VERSION = '1.0.0'
6
+ Kenya_international_code = 254
7
+ Capital_city = "Nairobi"
8
+ Total_provinces = 8
9
+
10
+ class Postcodes
11
+ #define a costant hash to hold the postcode data
12
+ POST_CODES = {"Tom_Mboya_St"=>"00400", "Ol_Butyo"=>"20229", "Okia"=>"90301",
13
+ "Makumbi"=>"20149", "Lamuria"=>"10139", "Longisa"=>"20402", "Lugulu"=>"50218",
14
+ "Tenges"=>"30405", "Ruaraka"=>"00618", "Rongo"=>"40404", "Nyangusu"=>"40218",
15
+ "Ndori"=>"40602", "Habaswein"=>"70201", "Butere"=>"50101", "Leseru"=>"30115",
16
+ "Kamuriai"=>"50408", "Kanam"=>"40315", "South_Kinangop"=>"20155", "Shabaab"=>"20150",
17
+ "Nyakwere"=>"40125", "Gathuthi"=>"10113", "Masimba"=>"40215", "Isibania"=>"40414",
18
+ "Sirongo"=>"40642", "Nuu"=>"90408", "Ndunyu_Njeru"=>"20317", "Namorio"=>"50231",
19
+ "Bar_Ober"=>"50411", "Timau"=>"10402", "Pembe_Tatu"=>"40113", "Nyambunwa"=>"40205",
20
+ "Malakisi"=>"50209", "Githunguri"=>"00216", "Langas"=>"30112", "Marima"=>"60408",
21
+ "Akado"=>"40114", "Ngorongo"=>"00225", "Kamwosor"=>"30113", "Sindo"=>"40308",
22
+ "Burnt_Forest"=>"30102", "Ndalani"=>"90118", "Roret"=>"20204", "Ratta"=>"40137",
23
+ "Nairage_Enkare"=>"20504", "Naivasha"=>"20117", "Maragi"=>"10221", "Chumvini"=>"80314",
24
+ "Huruma"=>"30109", "Kahuro"=>"10201", "Chesamisi"=>"50243", "Baragoi"=>"20601",
25
+ "Sultan_Hamud"=>"90132", "Pap_Onditi"=>"40111", "Ngong_Rd"=>"00505", "Naitiri"=>"50211",
26
+ "Chuka"=>"60400", "Mabusi"=>"50235", "Donyo_Sabuk"=>"01027", "Lower_Kabete"=>"00604",
27
+ "Omboga"=>"40306", "Nderu"=>"00229", "Faza"=>"80501", "Kakemer"=>"50419", "Luanda"=>"50307",
28
+ "Mariwa"=>"40408", "Yaya_Towers"=>"00508", "Tambach"=>"30704", "Sagana"=>"10230",
29
+ "Kaboson"=>"20412", "Nyabondo"=>"40124", "Bumutiru"=>"50418", "Ganze"=>"80205",
30
+ "Endau"=>"90206", "Witu"=>"80504", "Webuye"=>"50205", "Kapkateny"=>"50232",
31
+ "Lodwar"=>"30500", "Kabula"=>"50214", "Lusiola"=>"50320", "Ukunda"=>"80400",
32
+ "Rodi_Kopany"=>"40326", "Chesinendet"=>"20217", "Zombe"=>"90213",
33
+ "Nyacheki"=>"40217", "Kagicha"=>"10119", "Community"=>"00201",
34
+ "Voi"=>"80300", "Ronald_Ngala_St"=>"00300", "Oboch"=>"40129",
35
+ "Lokichar"=>"30505", "Eldama_Ravine"=>"20103", "Madina"=>"80207",
36
+ "Kamiti"=>"00607", "Nanyuki"=>"10400", "Kapcherop"=>"30204", "Vipingo"=>"80119",
37
+ "Dago"=>"40112", "Lukume"=>"50132", "Kabete"=>"00602", "Soy"=>"30105",
38
+ "Rhamu"=>"70302", "Chebara"=>"20138", "Kapedo"=>"30410", "Gachika"=>"00238",
39
+ "Rangwe"=>"40303", "Nyawara"=>"40633", "Ndithini"=>"01016", "Chepchoina"=>"30207",
40
+ "Kaibichbich"=>"30606", "Torongo"=>"20153", "Thigio"=>"00210", "Machakos"=>"90100",
41
+ "Masii"=>"90101", "Kabatini"=>"20120", "Chwele"=>"50202", "Akala"=>"40139",
42
+ "Ileho"=>"50111", "Bartabwa"=>"30409", "Gitugi"=>"10209", "Kanyoni"=>"01011",
43
+ "Chebunyo"=>"20226", "Voo"=>"90212", "Simat"=>"30127", "Ngonda"=>"10229",
44
+ "Eregi"=>"50303", "Isulu"=>"50114", "Elugulu"=>"50429", "Gatitu"=>"10114",
45
+ "Tawa"=>"90133", "Nyamtiro"=>"40419", "Ndaragwa"=>"20306", "Kakuma"=>"30501",
46
+ "Otonglo"=>"40108", "Othaya"=>"10106", "Njipiship"=>"40702", "Shimba_Hills"=>"80407",
47
+ "Sabatia"=>"20143", "Ngewa"=>"00901", "Manyuanda"=>"40625", "Ithanga"=>"01015",
48
+ "Nambacha"=>"50127", "Wodanga"=>"50311", "Cheborge"=>"20215", "Iten"=>"30700",
49
+ "Kainuk"=>"30604", "Ndalat"=>"30123", "Athi_River"=>"00204", "Chemamul"=>"20222",
50
+ "Waithaka"=>"00613", "Tigiji"=>"60210", "Kamwaura"=>"20132", "Cheptais"=>"50201",
51
+ "Jebrok"=>"50319", "North_Kinangop"=>"20154", "Kakibora"=>"30216", "Kabimoi"=>"20139",
52
+ "Thika"=>"01000", "Nyamarambe"=>"40206", "Bartolimo"=>"30408", "Kagunduini"=>"01033",
53
+ "Werugha"=>"80303", "Singore"=>"30703", "Baraton"=>"30306", "Labuiywo"=>"40144",
54
+ "Garissa"=>"70100", "Maai_Mahiu"=>"20147", "Makueni"=>"90300", "Lukolis"=>"50421",
55
+ "Maralal"=>"20600", "Mashini"=>"80312", "Tulia"=>"90203", "Leshau"=>"20310",
56
+ "Ahero"=>"40101", "Lumakanda"=>"50242", "Marua"=>"10127", "Uriri"=>"40228",
57
+ "Siakago"=>"60104", "Nyali"=>"80118", "Chepareria"=>"30605", "Lutaso"=>"50121",
58
+ "Sololo"=>"60701", "Ishiara"=>"60102", "Turi"=>"20129", "South_Horr"=>"20604",
59
+ "Sirende"=>"30213", "Riochanda"=>"40512", "Olenguruone"=>"20152", "Imanga"=>"50112",
60
+ "Embu"=>"60100", "Kandara"=>"01034", "Ongata_Rongai"=>"00511", "Lugari"=>"50108",
61
+ "El_Wak"=>"70301", "Gaitu"=>"60209", "Chemiron"=>"30206", "Gatundu"=>"01030",
62
+ "Suwerwa"=>"30212", "Siaya"=>"40600", "Nyangori"=>"40127", "Bondeni"=>"20101",
63
+ "Magumoni"=>"60403", "Othoro"=>"40224", "Wamunyu"=>"90103", "Tumu_Tumu"=>"10136",
64
+ "Nyamira"=>"40500", "Londiani"=>"20203", "Siongiroi"=>"20230", "Ngelesha"=>"20324",
65
+ "Nganduri"=>"60115", "Ndiyisi"=>"50229", "Buru_Buru"=>"00515", "Sigoti"=>"40135",
66
+ "Oyugis"=>"40222", "Ngambwa"=>"80311", "Agenga"=>"40406", "Mandera"=>"70300",
67
+ "Village_Market"=>"00621", "Ol_Kalou"=>"20303", "Nunguni"=>"90130", "Luandanyi"=>"50219",
68
+ "Mariakani"=>"80113", "Kaiboi"=>"30310", "Wajir"=>"70200", "Tongaren"=>"30218",
69
+ "Ruthangati"=>"10134", "Quarry_Road"=>"00624", "Passenga"=>"20311", "Kairi"=>"01007",
70
+ "Coast_Gen_Hsp"=>"80103", "Gatunga"=>"60404", "Nandi_Hills"=>"30301", "Kakunga"=>"50115",
71
+ "Kagio"=>"10306", "Malindi"=>"80200", "Endebess"=>"30201", "Ladhri_Awasi"=>"40122",
72
+ "Iriwa"=>"80310", "Aluor"=>"40140", "Kamukuywa"=>"50216", "Laare"=>"60601",
73
+ "Lolgorian"=>"40701", "Kabati"=>"90205", "Kamaget"=>"20218", "Kagumo"=>"10307",
74
+ "Garba_Tulla"=>"60301", "Gachoka"=>"60119", "Runyenjes"=>"60103",
75
+ "Ngoliba"=>"01012", "Baricho"=>"10302", "Makuyu"=>"01020", "Wanjengi"=>"10225",
76
+ "Sigowet"=>"20212", "Sarit_Centre"=>"00606", "Paw_Akuche"=>"40131", "Aram"=>"40618",
77
+ "Funyula"=>"50406", "Luandeti"=>"50240", "Chogoria"=>"60401", "Usenge"=>"40609",
78
+ "Rusinga"=>"40327", "Nkondi"=>"60214", "Kairo"=>"10215", "Mashuru"=>"01103",
79
+ "Serem"=>"50308", "Rigoma"=>"40511", "Uaso_Nyiro"=>"10137", "Hawinga"=>"40640",
80
+ "Luhano"=>"40623", "Ziwa"=>"30214", "Shimanyiro"=>"50131", "Samitsi"=>"50128",
81
+ "Nyangande"=>"40126", "Asumbi"=>"40309", "Wiyumiririe"=>"20329", "Uhuru_Gardens"=>"00000",
82
+ "Ruiru"=>"00232", "Ndigwa"=>"40630", "Adungosi"=>"50413", "Manyulia"=>"50126",
83
+ "Equator"=>"30122", "Ol_Joro_Orok"=>"20302", "Lugingo"=>"40622", "Dorofu"=>"50213",
84
+ "Bungoma"=>"50200", "Docks"=>"80104", "Bukura"=>"50105", "Diani_Beach"=>"80401",
85
+ "Lanet"=>"20112", "Gesima"=>"40503", "Kampi_Ya_Samaki"=>"30406", "Yala"=>"40610",
86
+ "Sorget"=>"20223", "Seretunin"=>"30407", "Naro_Moru"=>"10105", "Archers_Post"=>"60302",
87
+ "Uthiru"=>"00605", "Sasumua_Road"=>"00513", "Ndenderu"=>"00230", "KICC"=>"00203",
88
+ "Andingo"=>"40136", "Madiany"=>"40613", "Kanziko"=>"90208", "Thare"=>"01026",
89
+ "Njoro"=>"20107", "Daraja_Mbili"=>"40117", "Elburgon"=>"20102", "Bokoli"=>"50206",
90
+ "Isiolo"=>"60300", "Wamba"=>"20603", "Silibwet"=>"20422", "Shibuli"=>"50130",
91
+ "Ringa"=>"40226", "Marimanti"=>"60215", "Gacharageini"=>"10210", "Embakasi"=>"00501",
92
+ "Chemaner"=>"20407", "Likoni"=>"80110", "Kabartonjo"=>"30401", "Marsabit"=>"60500",
93
+ "Sigomre"=>"40635", "Nyeri"=>"10100", "Ngwata"=>"90129", "Highridge"=>"00612",
94
+ "Kajiado"=>"01100", "Viwandani"=>"00507", "Hamisi"=>"50312", "Bura_Tana"=>"70104",
95
+ "Kakuzi"=>"01014", "Lamu"=>"80500", "Sare"=>"40405", "Nyilima"=>"40611", "Masana"=>"50324",
96
+ "Sondu"=>"40109", "Sagalla"=>"80308", "Barwesa"=>"30411", "Nzeeka"=>"90136",
97
+ "Lokichoggio"=>"30503", "Anyiko"=>"40616", "Kapkesosio"=>"20414", "Ndanai"=>"20404",
98
+ "Plateau"=>"30116", "Nyangweso"=>"40311", "Nalondo"=>"50227", "Itibo"=>"40504",
99
+ "Kambiti"=>"10226", "Enterprise_Road"=>"00500", "Bumala"=>"50404", "Eldoret"=>"30100",
100
+ "Ogembo"=>"40204", "Ngarua"=>"20328", "Eastleigh"=>"00610", "Kaimosi"=>"50305",
101
+ "Songhor"=>"40110", "Gakoe"=>"01005", "Kalamba"=>"90306", "Gembe"=>"40312",
102
+ "Gakere_Road"=>"10109", "Sio_Port"=>"50401", "Omogonchoro"=>"40221", "Mahanga"=>"50322",
103
+ "Naishi"=>"20142", "Wanjohi"=>"20305", "Taveta"=>"80302", "Nyansiongo"=>"40502",
104
+ "Ntimaru"=>"40417", "Emarinda"=>"50110", "Tabani"=>"30220", "Manyani"=>"80301",
105
+ "Chepkemel"=>"20216", "Wagusu"=>"40638", "Thaara"=>"10110", "Shianda"=>"50106",
106
+ "Lokori"=>"30506", "Gakindu"=>"10111", "Makupa"=>"80112", "Ugunja"=>"40606",
107
+ "Samburu"=>"80120", "Ngara_Rd"=>"00600", "Chavakali"=>"50317", "Nakuru"=>"20100",
108
+ "Gatara"=>"10212", "Lokitaung"=>"30504", "Chemelil"=>"40116", "Sosiot"=>"20205",
109
+ "Riruta"=>"00512", "Kapkoros"=>"20415", "Lukusi"=>"50230", "Griftu"=>"70202",
110
+ "Kadel"=>"40314", "Lavington"=>"00603", "Wundanyi"=>"80304", "Sigor"=>"20405",
111
+ "Garsen"=>"80201", "Kapchorwa"=>"30311", "Awach_Bridge"=>"40115", "Nzoia"=>"50237",
112
+ "Ngong_Hills"=>"00208", "Bissil"=>"01101", "Egerton_University"=>"20115",
113
+ "Lolwe"=>"40128", "Nyayo_Stadium"=>"00506", "Ngorika"=>"20126", "Lunza"=>"50119",
114
+ "Bomet"=>"20400", "Makongeni"=>"00510", "Chepkiswet"=>"20137", "Magutuni"=>"60407",
115
+ "Dadaab"=>"70103", "Kaloleni"=>"80105", "Ragengni"=>"40604", "Kamberua"=>"10216",
116
+ "Maseno"=>"40105", "Rumuruti"=>"20321", "Magada"=>"50321", "Kamara"=>"20134",
117
+ "Gatura"=>"01013", "Kahuhia"=>"10206", "Malava"=>"50103", "Loiyangalani"=>"60501",
118
+ "Uranga"=>"40608", "Longonot"=>"20146", "Alupe"=>"50414", "Kapkatet"=>"20214",
119
+ "Ainabkoi"=>"30101", "Itumbe"=>"40210", "Sipili"=>"20326", "Nginyang"=>"30404",
120
+ "Dede"=>"40331", "Emali"=>"90121", "Loitokitok"=>"00209", "Westlands"=>"00800",
121
+ "Wanguru"=>"10303", "Wangige"=>"00614", "Arror"=>"30708", "Chepsonoi"=>"30309",
122
+ "Gituamba"=>"01003", "Watalii_Road"=>"80204", "Sotik"=>"20227", "Rongai"=>"20108",
123
+ "Racecourse_Road"=>"00617", "Makunga"=>"50133", "Cheptongei"=>"30709", "Tseikuru"=>"90409",
124
+ "Indechero"=>"50113", "Magombo"=>"40507", "Lusingeti"=>"00905", "Saboti"=>"30211",
125
+ "Ogen"=>"40130", "Got_Oyaro"=>"40313", "Makimeny"=>"20228", "Esso_Plaza"=>"00620",
126
+ "Suba_Kuria"=>"40418", "Ruringu"=>"10133", "Ronda"=>"20127", "Port_Victoria"=>"50410",
127
+ "Oltepesi"=>"00213", "Nyanturago"=>"40219", "Magadi"=>"00205", "Nambale"=>"50409",
128
+ "Marigat"=>"30403", "Vihiga"=>"50310", "Kabiyet"=>"30303", "Suguta_Mar_Mar"=>"20602",
129
+ "Rapogi"=>"40403", "Nyamache"=>"40203", "Marinde"=>"40318", "Kapcherany"=>"20413",
130
+ "Ramula"=>"40142", "Nyamonye"=>"40632", "Nyadorera"=>"40631", "Endarasha"=>"10107",
131
+ "Mago"=>"50325", "Busia"=>"50400", "Emining"=>"20140", "Gatondo"=>"10115", "Magunga"=>"40307",
132
+ "Kamuwongo"=>"90403", "Sikinwa"=>"30217", "Ogongo"=>"40323", "Kambiri"=>"50116",
133
+ "Amagoro"=>"50244", "Tombe"=>"40513", "Maragua"=>"10205", "Hola"=>"70101",
134
+ "Chemase"=>"40143", "Turbo"=>"30106", "Tala"=>"90131", "Rangala"=>"40634",
135
+ "Ndooa"=>"90202", "Mataara"=>"1009", "Chepkunyuk"=>"30308", "Gorgor"=>"20411",
136
+ "Lengita"=>"20506", "Eldoret_Airport"=>"30124", "Masinga"=>"90141",
137
+ "Nangili"=>"50239", "Timber_Mill_Rd"=>"20110", "Kabianga"=>"20201",
138
+ "Nango"=>"40615", "Kabarnet"=>"30400", "Manyatta"=>"60101", "Bulimbo"=>"50109",
139
+ "Weiwei"=>"30603", "Uplands"=>"00222", "Shinyalu"=>"50107", "Reru"=>"40133",
140
+ "Ndaraweta"=>"20420", "Enosaen"=>"40703", "Narok"=>"20500", "Lela"=>"40134",
141
+ "Sirembe"=>"40636", "Madeya"=>"40641", "Tiriki"=>"50309", "Otaro"=>"40324",
142
+ "Ndakaini"=>"01025", "Winam"=>"40141", "Wamagana"=>"10138", "Usigu"=>"40637",
143
+ "Ukwala"=>"40607", "Nyaru"=>"30131", "Makindu"=>"90138", "Manga"=>"40509",
144
+ "Kaheho"=>"20304", "Malinya"=>"50123", "Nguyoini"=>"10224", "Kerugoya"=>"10300",
145
+ "Kabazi"=>"20114", "Kadongo"=>"40223", "Gathugu"=>"00240", "Ichichi"=>"10227",
146
+ "Tausa"=>"80309", "Ngecha"=>"00218", "Dundori"=>"20118", "Limuru"=>"00217",
147
+ "Chebiemit"=>"30706", "Banja"=>"50316", "Nandolia"=>"50228", "Tarasaa"=>"80203",
148
+ "Solai"=>"20128", "Lita"=>"90109", "Butula"=>"50405", "Kalokol"=>"30502",
149
+ "Yoani"=>"90134", "Valley_Arcade"=>"00514", "Tot"=>"30707", "Olololunga"=>"20503",
150
+ "Olkurto"=>"20502", "Nyatike"=>"40402", "Lessos"=>"30302", "Watamu"=>"80202",
151
+ "Sirisia"=>"50208", "Ngiya"=>"40603", "Gambogi"=>"50318", "Bibirioni"=>"00226",
152
+ "Gede"=>"80208", "Ekalakala"=>"90139", "Dol_Dol"=>"10401", "Timboroa"=>"30108",
153
+ "Nziu"=>"90308", "Kahuti"=>"10214", "Boito"=>"20409", "Gatugura"=>"10305",
154
+ "Sega"=>"40614", "Ortum"=>"30602", "Nyahururu"=>"20300", "Nyaburi"=>"40322",
155
+ "Ndalu"=>"30219", "Amukura"=>"50403", "Sidindi"=>"40605", "Boro"=>"40620",
156
+ "Maji_Mazuri"=>"20145", "Kalimoni"=>"01001", "Vitengeni"=>"80211", "Ramba"=>"40330",
157
+ "Parklands"=>"00623", "Nguni"=>"90407", "Ngano"=>"20308", "Lorugum"=>"30507",
158
+ "Rakwaro"=>"40325", "Nairobi_GPO"=>"00100", "Gatukuyu"=>"01028", "Obekai"=>"50427",
159
+ "Maliki"=>"50221", "Homa_Bay"=>"40300", "Chesoi"=>"30712", "Kakamega"=>"50100",
160
+ "Bondo"=>"40601", "Ranen"=>"40412", "Pala"=>"40329", "City_Square"=>"00200",
161
+ "Cheptalal"=>"20410", "Maiella"=>"20148", "Mairo_Inya"=>"20314", "Marani"=>"40214",
162
+ "Ndiru"=>"40321", "Kapenguria"=>"30600", "Sulmac"=>"20151", "Ruri"=>"20313",
163
+ "Nyaramba"=>"40514", "Kampi_Ya_Moto"=>"20121", "Elementaita"=>"20119",
164
+ "Gitimene"=>"60212", "Namanga"=>"00207", "Lwakhakha"=>"50220", "Suna"=>"40400",
165
+ "Sawagongo"=>"40612", "Chepterwai"=>"30121", "Marmanet"=>"20322", "Kapcheno"=>"30304",
166
+ "Maragoli"=>"50300", "Mageta"=>"40624", "Rabuor"=>"40132", "Gathiruini"=>"00239",
167
+ "Hakati"=>"50407", "Laboret"=>"30126", "Sifuyo"=>"40643", "Chuluni"=>"90219",
168
+ "Kapkenda"=>"30119", "Dudi"=>"40621", "Kagwe"=>"00223", "Isinya"=>"01102",
169
+ "Madaraka"=>"01002", "Angurai"=>"50412", "Wamwangi"=>"01010", "Saba_Saba"=>"10208",
170
+ "Magwagwa"=>"40508", "Buyofu"=>"50210", "Anyuongi"=>"40617", "Kabiemit"=>"30130",
171
+ "Naro_Sura"=>"20505", "Lukore"=>"80408", "Bunyore"=>"50301", "Emuhaya"=>"50314",
172
+ "Chebororwa"=>"30125", "Shiatsala"=>"50129", "Riosiri"=>"40220", "Oriang"=>"40227",
173
+ "Ndhiwa"=>"40302", "Kakoneni"=>"80209", "Changamwe"=>"80102", "Nkubu"=>"60202",
174
+ "Ndere"=>"40629", "Budalangi"=>"50415", "Makutano"=>"20141", "Gatarakwa"=>"10112",
175
+ "Chamakhanga"=>"50302", "Lurambi"=>"50120", "Subukia"=>"20109", "Maktau"=>"80315",
176
+ "Kalawa"=>"90126", "Kanyuambora"=>"60106", "Juja_Road"=>"00622", "Gakurwe"=>"10211",
177
+ "Langata"=>"00509", "Tunyai"=>"60213", "Etago"=>"40208", "Lunga_Lunga"=>"80402",
178
+ "Kamahuha"=>"10217", "Ilasit"=>"00214", "Gongoni"=>"80206", "Asembo_Bay"=>"40619",
179
+ "Malaha"=>"50122", "Fort_Ternan"=>"20209", "Thangathi"=>"10135", "Othoch_Rakuom"=>"40411",
180
+ "Oloomirani"=>"20507", "Kapkelek"=>"20219", "Chepkorio"=>"30129", "Kacheliba"=>"30601"}
181
+
182
+
183
+ #returns a postcode value.
184
+ #Note: Where a postoffice has more than one name, the names are separated by an underscore.
185
+ #e.g Juja_Road,Kambi_Ya_Moto
186
+ def postcode(postoffice)
187
+ #postoffice.capitalize_first_letter
188
+ POST_CODES[postoffice]
189
+ end
190
+
191
+ #returns a postoffice's name. The name must be a string value in Proper Case
192
+ def postoffice(postcode)
193
+ #probabably not the most efficient way of doing this
194
+ post_codes_invert = POST_CODES.invert
195
+ post_codes_invert[postcode]
196
+ end
197
+
198
+ #returns the total number postoffices in the records
199
+ def number_of_postoffices
200
+ POST_CODES.size + 1
201
+ end
202
+
203
+ #returns an array of all postoffices in the record.
204
+ def list_postoffices
205
+ POST_CODES.keys.sort
206
+ end
207
+
208
+ #Returns a YML formated output of all the postcodes and postoffices
209
+ def yml_output
210
+ POST_CODES.to_yaml
211
+ end
212
+
213
+ end
214
+ end
215
+
216
+
217
+ #codes = Kenyacodes::Postcodes.new
218
+ #p Kenyacodes::Kenya_international_code
219
+ #p codes.town(10300)
220
+
221
+ #include Kenyacodes
222
+ #
223
+ #p Kenya_international_code
224
+ #usage
225
+ #require 'kenyacodes'
226
+
227
+ #codes = Kenyacodes::Postcodes.new
228
+ #p codes.postoffice('10300')
229
+ #p codes.postcode('Nakuru')
230
+ #p codes.list_postoffices
231
+ #p codes.number_of_postoffices
232
+ #p codes.yml_output