The base class for all of the objects that make up the parse trees. Handles things like file name, line #, and also does the initialization for all of the parameters of all of the child objects.
AST | = | Puppet::Parser::AST | Do this so I don‘t have to type the full path in all of the subclasses |
parent | [RW] | |
scope | [RW] | |
use_docs | [RW] |
Initialize the object. Requires a hash as the argument, and takes each of the parameters of the hash and calls the settor method for them. This is probably pretty inefficient and should likely be changed at some point.
Evaluate the current object. Just a stub method, since the subclass should override this method. of the contained children and evaluates them in turn, returning a list of all of the collected values, rejecting nil values
The version of the evaluate method that should be called, because it correctly handles errors. It is critical to use this method because it can enable you to catch the error where it happens, rather than much higher up the stack.