Module RubiGen
In: lib/rubigen/scripts.rb
lib/rubigen/lookup.rb
lib/rubigen/spec.rb
lib/rubigen/manifest.rb
lib/rubigen/options.rb
lib/rubigen/base.rb
lib/rubigen/commands.rb
lib/rubigen/simple_logger.rb
lib/rubigen/generated_attribute.rb
lib/rubigen/helpers/generator_test_helper.rb
lib/rubigen.rb

RubiGen is a code generation platform Ruby frameworks. Generators are easily invoked within Ruby framework instances to add and remove components such as library and test files.

New generators are easy to create and may be distributed within RubyGems, user home directory, or within each Ruby framework that uses RubiGen.

For example, newgem uses RubiGen to generate new RubyGems. Those generated RubyGems can then use RubiGen (via a generated script/generate application) to generate tests and executable apps, etc, for the RubyGem.

Generators may subclass other generators to provide variations that require little or no new logic but replace the template files.

For a RubyGem, put your generator classes and templates within subfolders of the generators directory.

The layout of generator files can be seen in the built-in test_unit generator:

  test_unit_generators/
    test_unit/
      test_unit_generator.rb
      templates/
        test_unit.rb

The directory name (test_unit) matches the name of the generator file (test_unit_generator.rb) and class (TestUnitGenerator). The files that will be copied or used as templates are stored in the templates directory.

The filenames of the templates don‘t matter, but choose something that will be self-explanatory since you will be referencing these in the manifest method inside your generator subclass.

Classes and Modules

Module RubiGen::Commands
Module RubiGen::GeneratorTestHelper
Module RubiGen::Lookup
Module RubiGen::Options
Module RubiGen::Scripts
Class RubiGen::AbstractGemSource
Class RubiGen::Base
Class RubiGen::GemPathSource
Class RubiGen::GeneratedAttribute
Class RubiGen::GeneratorError
Class RubiGen::Manifest
Class RubiGen::PathFilteredSource
Class RubiGen::PathSource
Class RubiGen::Source
Class RubiGen::Spec
Class RubiGen::UsageError

Constants

VERSION = '1.5.6'

[Validate]