Class PageTemplate::ValueCommand
In: lib/PageTemplate/commands.rb
Parent: Command

ValueCommand will print out a variable name, possibly passing its value through a preprocessor.

% var variable [:processor
%]

variable is first plucked out of the Namespace,

The to_s of the output from Namespace#get is passed through parser‘s preprocessor. If :processor is defined, then parser.preprocessor.send(:processor,body) is called. This allows the designer to choose a particular format for the output. If :processor is not given, then parser‘s default processor is used.

Methods

new   output   to_s  

Public Class methods

Creates the ValueCommand, with value as the name of the variable to be inserted during output. parser is the Parser object, which we save so we can access its Preprocessor and its default preprocessor

Public Instance methods

Requests the value of this object‘s saved value name from namespace, and returns the string representation of that value to the caller, after passing it through the preprocessor.

[Validate]