Class: Uttk::Generators::StrategyGenerator

Inherits:
Generator
  • Object
show all
Defined in:
lib/uttk/generators/strategy_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/strategy_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
21
22
# File 'lib/uttk/generators/strategy_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::Strategies::#{class_name}"

    # Source and test directories.
    m.directory root/lib/uttk/strategies
    m.directory root/test/unit/strategies

    # Source and test templates.
    m.template 'strategy.rb',  root/lib/uttk/strategies/"#{class_name}.rb"
    m.template 'strategy.yml', root/test/functional/"#{file_name}.yml"
  end
end

#module_nameObject



24
25
26
# File 'lib/uttk/generators/strategy_generator.rb', line 24

def module_name
  :Strategies
end