Module Rails::Generator::Lookup
In: vendor/rails/railties/lib/rails_generator/lookup.rb

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 instance 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 each. PathSource and GemGeneratorSource are provided.

Methods

included   instance  

Classes and Modules

Module Rails::Generator::Lookup::ClassMethods

Public Class methods

[Source]

    # File vendor/rails/railties/lib/rails_generator/lookup.rb, line 51
51:       def self.included(base)
52:         base.extend(ClassMethods)
53:         base.use_component_sources!
54:       end

Public Instance methods

Convenience method to instantiate another generator.

[Source]

    # File vendor/rails/railties/lib/rails_generator/lookup.rb, line 57
57:       def instance(generator_name, args, runtime_options = {})
58:         self.class.instance(generator_name, args, runtime_options)
59:       end

[Validate]