*As an experiment* I've put the code from Programming Ruby online at
http://www.pragmaticprogrammer.com/ruby/samples/
It's organized by page, so you should be able to find the code pretty
easily. Using ideas from Kevin and Conrad, I decided to represent the
code in three ways:
1. The basic display is the code that you see on the page.
2. If there is hidden code needed to get this displayed code to run,
there'll be a hidden code link at the bottom-right of the code
display. Click it, and you'll get a window showing all the code,
with the code shown in the book highlighted.
3. From either of these windows, click the 'download' button and
you'll get the raw Ruby code (in full) for that
example. Depending on how your browser is set up, this may appear
in a window, or it may get downloaded as a file.
There are 1081 code examples in the book (I now know), and this whole
bundle contains roughly twice that many files. As a result, I have to
admit that I haven't checked them all for errors ;-)
Anyway, let me know if you think it's useful, and I'll integrate it
into the site.
Regards
Dave