class TaskJuggler::TjpExample

This class can extract snippets from an annotated TJP syntax file. The file does not care about the TJP syntax but the annotation lines must start with a ‘#’ character at the begining of the line. The snippets must be enclosed by a starting line and an ending line. Each snippet must have a unique tag that can be used to retrieve the specific snip.

The following line starts a snip called ‘foo’: # *** EXAMPLE: foo +

The following line ends a snip called ‘foo’: # *** EXAMPLE: foo -

The function TjpExample#to_s() can be used to get the content of the snip. It takes the tag name as optional parameter. If no tag is specified, the full example without the annotation lines is returned.