Class: Uttk::Generators::GeneratorGenerator

Inherits:
Generator
  • Object
show all
Defined in:
lib/uttk/generators/generator_generator.rb

Overview

Copyright

Copyright © 2005 Uttk Team. All rights reserved.

Author

Nicolas Pouillard <[email protected]>.

License

LGPL

Revision

$Id: /w/fey/uttk/trunk/lib/uttk/generators/generator_generator.rb 21975 2006-02-19T22:24:11.182512Z pouillar $

Instance Attribute Summary

Attributes inherited from Generator

#email, #fullname, #root, #year

Instance Method Summary collapse

Methods inherited from Generator

#dir_name, #initialize

Constructor Details

This class inherits a constructor from Uttk::Generators::Generator

Instance Method Details

#manifestObject



8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/uttk/generators/generator_generator.rb', line 8

def manifest
  # FIXME do not ignore class_path
  record do |m|
    # Check for class naming collisions.
    m.class_collisions class_path, class_name,
                       "Uttk::Generators::#{class_name}Generator"

    m.directory root/lib/uttk/generators

    m.template 'generator.rb',
               root/lib/uttk/generators/"#{file_name}_generator.rb"
  end
end

#module_nameObject



22
23
24
# File 'lib/uttk/generators/generator_generator.rb', line 22

def module_name
  class_name.pluralize
end