Module: Templater::Manifold

Module | Templater::Manifold
In: | lib/templater/manifold.rb

### Methods

add add_private add_public desc generator generators private_generators public_generators remove run_cli

### Public Instance methods

add(name, generator)

Alias for add_public

add_private(name, generator)

Add a generator for internal use to this manifold.

### Parameters

name<Symbol>: | The name given to this generator in the manifold
generator<Templater::Generator>: | The generator class

add_public(name, generator)

Add a generator to this manifold

### Parameters

name<Symbol>: | The name given to this generator in the manifold
generator<Templater::Generator>: | The generator class

desc(text = nil)

If the argument is omitted, simply returns the description for this manifold, otherwise sets the description to the passed string.

### Parameters

text<String>: | A description

### Returns

String: | The description for this manifold

generator(name)

Finds the class of a generator, given its name in the manifold.

### Parameters

name<Symbol>: | The name of the generator to find

### Returns

Templater::Generator: | The found generator class

generators()

Lists all generators in this manifold

### Returns

Array[Templater::Generator]: | A list of generators

private_generators()

Lists all private generators, these are generators that are meant to be used only internally and should not be invoked directly (although the interface may choose to do so)

### Returns

Array[Templater::Generator]: | A list of generators

public_generators()

Lists all public generators, these are generators that are meant to be invoked directly by the user.

### Returns

Array[Templater::Generator]: | A list of generators

remove(name)

Remove the generator with the given name from the manifold

### Parameters

name<Symbol>: | The name of the generator to be removed.

run_cli(destination_root, name, version, args)

A Shortcut method for invoking the command line interface provided with Templater.

### Parameters

destination_root<String>: | Where the generated files should be put, this would usually be Dir.pwd
name<String>: | The name of the executable running this generator (such as ‘merb-gen’)
version<String>: | The version number of the executable.
args<Array[String]>: | An array of arguments to pass into the generator. This would usually be ARGV

[Validate]