RubiGen::Lookup

Generator lookup is managed by a list of sources which return specs describing where to find and how to create generators. This module provides class methods for manipulating the source list and looking up generator specs, and an # wrapper for quickly instantiating generators by name.

A spec is not a generator: it’s a description of where to find the generator and how to create it. A source is anything that yields generators from #. PathSource and GemGeneratorSource are provided.

Public Class Methods

included(base) click to toggle source
    # File lib/rubigen/lookup.rb, line 50
50:     def self.included(base)
51:       base.extend(ClassMethods)
52:       # base.use_component_sources!  # TODO is this required since it has no scope/source context
53:     end

Public Instance Methods

instance(generator_name, args, runtime_options = {}) click to toggle source

Convenience method to instantiate another generator.

    # File lib/rubigen/lookup.rb, line 56
56:     def instance(generator_name, args, runtime_options = {})
57:       self.class.active.instance(generator_name, args, runtime_options)
58:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.