sample.rb

Path: markup/sample/sample.rb
Last Update: Thu Sep 22 16:49:19 JST 2005

This program illustrates the basic use of the SimpleMarkup class. It extracts the first comment block from the simple_markup.rb file and converts it into HTML on standard output. Run it using

 % ruby sample.rb

You should be in the sample/ directory when you do this, as it hardwires the path to the files it needs to require. This isn‘t necessary in the code you write once you‘ve installed the package.

For a better way of formatting code comment blocks (and more) see the rdoc package.

Required files

rdoc/markup/simple_markup   rdoc/markup/simple_markup/to_html  

[Validate]