Class: Zucchini::Generator

Inherits:
Clamp::Command
  • Object
show all
Defined in:
lib/zucchini/generator.rb

Instance Method Summary collapse

Instance Method Details

#executeObject



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_pathObject



7
8
9
# File 'lib/zucchini/generator.rb', line 7

def templates_path
  File.expand_path("#{File.dirname(__FILE__)}/../../templates")
end