class

Pegasus::Generators::Api::FileGenerator(C, I)

Inherits Reference / Object

A base class for a source file generator. This class is meant to be extended by each individual file generator that uses ECR, and thus provides the methods #input! and #context to make the genertor's input and context available inside the template file.

Constructors

new(parent : Pegasus::Generators::Api::PegasusOptionParser(C, I), name : String, default_filename : String, description : String)

Creates a new file generator attached to he given PegasusOptionParser, with the given name, default filename, and description.

Source

Instance methods

add_option(opt_parser)

Adds required options to the given option parser.

Source
context

Convenience method to access the parser context from an ECR template.

Source
default_filename

The default filename this generator will write to.

Source
default_filename=(default_filename : String)

The default filename this generator will write to.

Source
description

The user-friendly description of this generator.

Source
description=(description : String)

The user-friendly description of this generator.

Source
input!

Convenience method to access the parser generator input from an ECR template.

Source
name

The internal name of this file generator, which will be associated with a filename by the PegasusOptionParser.

Source
name=(name : String)

The internal name of this file generator, which will be associated with a filename by the PegasusOptionParser.

Source
parent

The parser program to which this generator belongs, used to retreive input and context and to configure and retreive file names.

Source
parent=(parent : PegasusOptionParser(C, I))

The parser program to which this generator belongs, used to retreive input and context and to configure and retreive file names.

Source