Module RubiGen::Lookup::ClassMethods
In: lib/rubigen/lookup.rb

Methods

Public Instance methods

Add a source to the end of the list.

Convenience method to lookup and instantiate a generator.

Lookup knows how to find generators’ Specs from a list of Sources. Searches the sources, in order, for the first matching name.

Add a source to the beginning of the list.

Reset the source list.

The list of sources where we look, in order, for generators.

Use application generators (app, ?).

Use component generators (test_unit, etc).

  1. Current application. If APP_ROOT is defined we know we‘re generating in the context of this application, so search APP_ROOT/generators.
  2. User home directory. Search ~/.rubigen/generators.
  3. RubyGems. Search for gems containing /{scope}_generators folder.
  4. Builtins. None currently.

Search can be filtered by passing one or more prefixes. e.g. use_component_sources!(:rubygems) means it will also search in the following folders:

  1. User home directory. Search ~/.rubigen/rubygems_generators.
  2. RubyGems. Search for gems containing /rubygems_generators folder.

[Validate]