This post originated from an RSS feed registered with Ruby Buzz
by Red Handed.
Original Post: Become a Try Ruby Narrator Straightaway
Feed Title: RedHanded
Feed URL: http://redhanded.hobix.com/index.xml
Feed Description: sneaking Ruby through the system
Well, with the Try Ruby tutorial done, it’s time to work on adding a number of other more advanced tutorials. Or even just different takes on starting off.
You can find a list of tutorials in the TUTORIALS constant. To start a small test tutorial I started: run 'meta'. Alternatively, they’re listed in /Tutorials.
Finally, if you want to link directly to a tutorial: http://tryruby.hobix.com/?meta.
To add your own tutorial, check out from http://code.whytheluckystiff.net/svn/tryruby/trunk/htdocs/tutorials. Add your-tutorial.html, following the conventions in meta.html and intro.html.
Each lesson page is contained in a div with a CSS class of stretcher.
Summaries, chapter headers are a CSS class of chapmark.
Load code into the interpreter with a div of CSS class of load, placed inside the lesson page. It will be executed when the page is displayed.
Check answers with answer and stdout classed div elements. These elements contain a regular expression. If the answer matches the regexp, the lesson proceeds.
I still need a script to update the site from SVN. For now, I’ll push things over manually each night.