Class: Zucchini::Generator
- Inherits:
-
Clamp::Command
- Object
- Clamp::Command
- Zucchini::Generator
- Defined in:
- lib/zucchini/generator.rb
Instance Method Summary collapse
Instance Method Details
#execute ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/zucchini/generator.rb', line 11 def execute if project? FileUtils.mkdir_p(path) FileUtils.cp_r("#{templates_path}/project/.", path) elsif feature? then FileUtils.cp_r("#{templates_path}/feature", path) end end |
#templates_path ⇒ Object
7 8 9 |
# File 'lib/zucchini/generator.rb', line 7 def templates_path File.("#{File.dirname(__FILE__)}/../../templates") end |