The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Become a Try Ruby Narrator Straightaway

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Red Handed

Posts: 1158
Nickname: redhanded
Registered: Dec, 2004

Red Handed is a Ruby-focused group blog.
Become a Try Ruby Narrator Straightaway Posted: Dec 27, 2005 4:20 PM
Reply to this message Reply

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
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Red Handed
Latest Posts From RedHanded

Advertisement

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.

 >> Dir['/Tutorials/*']                                                          
 => [".", "..", "intro.rb", "meta.rb"]                                           
 >> require '/Tutorials/intro'                                                   
 => true

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.

  1. Each lesson page is contained in a div with a CSS class of stretcher.
  2. Summaries, chapter headers are a CSS class of chapmark.
  3. 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.
  4. 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.

Read: Become a Try Ruby Narrator Straightaway

Topic: Dividing with 'such careless honesty' Previous Topic   Next Topic Topic: Rubygems installation

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use