xiv Contents in Detail
9
MORE COMPLEX UTILITIES AND TRICKS, PART I 161
#34 Finding Codes in the Bible or Moby-Dick (els_parser.rb) .................................... 161
The Code ............................................................................................... 162
How It Works ......................................................................................... 164
Running the Script ................................................................................... 167
The Results ............................................................................................. 167
Hacking the Script ................................................................................... 168
#35 Mutating Strings into Weasels (methinks.rb) ...................................................... 168
The Code ............................................................................................... 168
How It Works ......................................................................................... 171
Running the Script ................................................................................... 174
The Results ............................................................................................. 174
Hacking the Script ................................................................................... 175
#36 Mutating the Mutation of Strings into Weasels (methinks_meta.rb) ....................... 176
The Code ............................................................................................... 177
How It Works ......................................................................................... 179
Running the Script ................................................................................... 181
The Results ............................................................................................. 181
Hacking the Script ................................................................................... 182
Chapter Recap ..................................................................................................... 183
10
MORE COMPLEX UTILITIES AND TRICKS, PART II 185
#37 Overnight DJ (radio_player1.rb) ...................................................................... 186
The Code ............................................................................................... 186
How It Works ......................................................................................... 187
The Results ............................................................................................. 189
Hacking the Script ................................................................................... 190
#38 Better Overnight DJ (radio_player2.rb) ............................................................. 190
The Code ............................................................................................... 190
How It Works ......................................................................................... 191
The Results ............................................................................................. 192
Hacking the Script ................................................................................... 193
#39 Numbers by Name (to_lang.rb) ...................................................................... 193
The Code ............................................................................................... 194
How It Works ......................................................................................... 198
The Results ............................................................................................. 201
Hacking the Script ................................................................................... 202
#40 Elegant Maps and Injects (symbol.rb) ............................................................... 203
The Code ............................................................................................... 203
How It Works ......................................................................................... 203
The Results ............................................................................................. 204
Hacking the Script ................................................................................... 204
Chapter Recap ..................................................................................................... 204