bingoint 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/README ADDED
@@ -0,0 +1,3 @@
1
+ == BingoInt
2
+
3
+ Convert Integers into their Bingo equivalent. No really.
@@ -0,0 +1,253 @@
1
+ ---
2
+ 1:
3
+ - "Kelly's eye"
4
+ - "At the beginning"
5
+ - "Nelson's column"
6
+ 2:
7
+ - "One little duck"
8
+ - "Me and you"
9
+ 3:
10
+ - "You and me"
11
+ - "Cup of tea"
12
+ - "One Little Flea"
13
+ 4:
14
+ - "Knock at the door"
15
+ 5:
16
+ - "Man alive"
17
+ 6:
18
+ - "Tom's tricks"
19
+ - "Tom Nix"
20
+ - "Chopsticks"
21
+ 7:
22
+ - "Lucky seven"
23
+ - "God's in heaven"
24
+ 8:
25
+ - "One Fat Lady"
26
+ - "Golden gate"
27
+ 9:
28
+ - "Doctor's orders"
29
+ 10:
30
+ - "Tony's Den"
31
+ 11:
32
+ - "Legs eleven"
33
+ 12:
34
+ - "One dozen"
35
+ - "One and two: a dozen"
36
+ - "Monkey's cousin"
37
+ 13:
38
+ - "Unlucky for some"
39
+ - "Devil's number"
40
+ - "Bakers dozen"
41
+ 14:
42
+ - "Valentines day"
43
+ 15:
44
+ - "Rugby team"
45
+ - "Young and keen"
46
+ 16:
47
+ - "Sweet sixteen"
48
+ - "She's lovely"
49
+ - "Never been kissed"
50
+ 17:
51
+ - "Often been kissed"
52
+ - "The age to catch 'em"
53
+ - "Dancing Queen"
54
+ 18:
55
+ - "Key of the door"
56
+ - "Coming of age"
57
+ 19:
58
+ - "Goodbye teens"
59
+ 20:
60
+ - "Getting plenty"
61
+ - "Blind twenty"
62
+ 21:
63
+ - "Key of the door"
64
+ 22:
65
+ - "Two little ducks"
66
+ - "All the twos"
67
+ 23:
68
+ - "Thee and me"
69
+ - "The Lord is my Shepherd"
70
+ 24:
71
+ - "Two dozen"
72
+ 25:
73
+ - "Duck and dive"
74
+ 26:
75
+ - "Bed and breakfast"
76
+ - "Half a crown"
77
+ - "Pick and mix"
78
+ 27:
79
+ - "Little duck with a crutch"
80
+ - "Gateway to heaven"
81
+ 28:
82
+ - "In a state"
83
+ - "Over weight"
84
+ 29:
85
+ - "You're doing fine"
86
+ 30:
87
+ - "Burlington Bertie"
88
+ - "Dirty Gertie"
89
+ - "Speed limit"
90
+ - "Flirty thirty"
91
+ - "Blind thirty"
92
+ 31:
93
+ - "Get up and run"
94
+ 32:
95
+ - "Buckle my Shoe"
96
+ 33:
97
+ - "Dirty knees"
98
+ - "All the threes"
99
+ - "All the feathers"
100
+ - "Two little fleas"
101
+ - "Sherwood Forest"
102
+ 34:
103
+ - "Ask for more"
104
+ 35:
105
+ - "Jump and jive"
106
+ 36:
107
+ - "Three dozen"
108
+ 37:
109
+ - "A flea in heaven"
110
+ 38:
111
+ - "Christmas cake"
112
+ 39:
113
+ - "Those famous steps"
114
+ 40:
115
+ - "Naughty Forty"
116
+ 41:
117
+ - "Time for fun"
118
+ 42:
119
+ - "That famous street in Manhattan"
120
+ - "Whinny the Pooh"
121
+ 43:
122
+ - "Down on your knees"
123
+ 44:
124
+ - "Droopy drawers"
125
+ - "All the fours"
126
+ 45:
127
+ - "Halfway house"
128
+ - "Halfway there"
129
+ 46:
130
+ - "Up to tricks"
131
+ 47:
132
+ - "Four and seven"
133
+ 48:
134
+ - "Four dozen"
135
+ 49:
136
+ - "PC (Police Constable)"
137
+ - "Copper"
138
+ - "Nick nick"
139
+ 50:
140
+ - "Bulls eye"
141
+ - "Blind fifty"
142
+ - "Half a century"
143
+ 51:
144
+ - "Tweak of the thumb"
145
+ 52:
146
+ - "Weeks in a year"
147
+ - "Danny La Rue"
148
+ 53:
149
+ - "Stuck in the tree"
150
+ 54:
151
+ - "Clean the floor"
152
+ 55:
153
+ - "Snakes alive"
154
+ - "All the fives"
155
+ 56:
156
+ - "Was she worth it?"
157
+ 57:
158
+ - "Heinz varieties"
159
+ 58:
160
+ - "Make them wait"
161
+ - "Choo choo Thomas"
162
+ 59:
163
+ - "Brighton line"
164
+ 60:
165
+ - "Three score"
166
+ - "Blind sixty"
167
+ - "Five dozen"
168
+ 61:
169
+ - "Bakers bun"
170
+ 62:
171
+ - "Tickety boo"
172
+ - "Turn on the screw"
173
+ 63:
174
+ - "Tickle me"
175
+ 64:
176
+ - "Red raw"
177
+ - "The Beatles number"
178
+ 65:
179
+ - "Old age pension"
180
+ 66:
181
+ - "Clickety click"
182
+ - "All the sixes"
183
+ 67:
184
+ - "Made in heaven"
185
+ - "Argumentative number"
186
+ 68:
187
+ - "Saving grace"
188
+ 69:
189
+ - "The same both ways"
190
+ - "your place or mine"
191
+ - "Either way up"
192
+ - "Meal for two"
193
+ 70:
194
+ - "Three score and ten"
195
+ - "Blind seventy"
196
+ 71:
197
+ - "Bang on the drum"
198
+ 72:
199
+ - "A crutch and a duck"
200
+ - "Six dozen"
201
+ - "Par for the course"
202
+ 73:
203
+ - "Crutch and a flea"
204
+ - "Queen Bee"
205
+ 74:
206
+ - "Candy store"
207
+ 75:
208
+ - "Strive and strive"
209
+ 76:
210
+ - "Trombones"
211
+ 77:
212
+ - "Sunset strip"
213
+ - "All the sevens"
214
+ - "Two little crutches"
215
+ 78:
216
+ - "Heavens gate"
217
+ 79:
218
+ - "One more time"
219
+ 80:
220
+ - "Gandhi's breakfast"
221
+ - "Blind eighty"
222
+ - "Eight and blank"
223
+ 81:
224
+ - "Fat lady and a little wee"
225
+ - "Stop and run"
226
+ 82:
227
+ - "Fat lady with a duck"
228
+ - "Straight on through"
229
+ 83:
230
+ - "Fat lady with a flea"
231
+ - "Time for tea"
232
+ - "Ethel's Ear"
233
+ 84:
234
+ - "Seven dozen"
235
+ 85:
236
+ - "Staying alive"
237
+ 86:
238
+ - "Between the sticks"
239
+ 87:
240
+ - "Fat lady with a crutch"
241
+ - "Torquay in Devon"
242
+ 88:
243
+ - "Two fat ladies"
244
+ - "All the eights"
245
+ - "Wobbly wobbly"
246
+ 89:
247
+ - "Nearly there"
248
+ - "All but one"
249
+ 90:
250
+ - "Top of the shop"
251
+ - "Top of the house"
252
+ - "Blind ninety"
253
+ - "End of the line"
data/init.rb ADDED
@@ -0,0 +1 @@
1
+ require File.join(File.dirname(__FILE__), 'lib', 'bingo_int')
data/lib/bingo_int.rb ADDED
@@ -0,0 +1,35 @@
1
+ require 'yaml'
2
+
3
+ module BingoInt
4
+ begin
5
+ print "Loading BingoInt Token List... "
6
+ LIST = ::YAML.load_file(File.expand_path(File.dirname(__FILE__) + '/../config/bingo-list.yml'))
7
+ print " Complete!\n"
8
+ print "Extracting #{LIST.values.flatten.size} methods... "
9
+ METHODS = LIST.inject({}) {|res, (i, ms)| res.merge(ms.inject({}) {|r, m| r.merge({m.gsub(/[^\s\w]/, '').gsub(/\s+/, '_').downcase=>i})}) }
10
+ print "Complete!\n"
11
+ rescue StandardError => error_msg
12
+ LIST = {}
13
+ METEHODS = {}
14
+ print "Incomplete! (see error message below)\n"
15
+ puts "#{'-='*40}-\n\n"
16
+ puts error_msg
17
+ puts "\n#{'-='*40}-\n"
18
+ end
19
+ end
20
+
21
+ class Object
22
+ BingoInt::METHODS.each do |name, value|
23
+ define_method(name) { value }
24
+ end
25
+ end
26
+
27
+ class Integer
28
+ def bingo
29
+ BingoInt::LIST[self]
30
+ end
31
+
32
+ def to_bingo(random=false)
33
+ bingo ? (random ? bingo[rand(bingo.size)] : bingo[0] ) : self.to_s
34
+ end
35
+ end
data/lib/bingoint.rb ADDED
@@ -0,0 +1 @@
1
+ require File.join(File.dirname(__FILE__), 'bingo_int')
metadata ADDED
@@ -0,0 +1,59 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bingoint
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Alex Neill
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-12-01 00:00:00 +00:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description: Convert Integers into their Bingo equivalent. No really.
17
+ email: alex@featureless.co.uk
18
+ executables: []
19
+
20
+ extensions: []
21
+
22
+ extra_rdoc_files: []
23
+
24
+ files:
25
+ - README
26
+ - init.rb
27
+ - lib/bingoint.rb
28
+ - lib/bingo_int.rb
29
+ - config/bingo-list.yml
30
+ has_rdoc: true
31
+ homepage: http://github.com/ajn/bingoint
32
+ licenses: []
33
+
34
+ post_install_message:
35
+ rdoc_options: []
36
+
37
+ require_paths:
38
+ - lib
39
+ required_ruby_version: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: "0"
44
+ version:
45
+ required_rubygems_version: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: "0"
50
+ version:
51
+ requirements: []
52
+
53
+ rubyforge_project:
54
+ rubygems_version: 1.3.5
55
+ signing_key:
56
+ specification_version: 3
57
+ summary: Convert Integers into their Bingo equivalent. No really.
58
+ test_files: []
59
+