Class: New

Inherits:
Thor
  • Object
show all
Includes:
Mixin::Logger, Thor::Actions
Defined in:
lib/fox/interface/thor/new.rb

Instance Method Summary collapse

Methods included from Mixin::Logger

#initialize

Instance Method Details

#generate(projectname) ⇒ Object



29
30
31
32
33
34
35
36
37
38
39
# File 'lib/fox/interface/thor/new.rb', line 29

def generate projectname

  @logger.message :info, "Generating project '#{projectname.to_s}' in folder './#{projectname.to_s}'"

  type      = select_type
  @logger.message :info, "Using #{type.to_s} type"

  template  = File.expand_path( File.dirname(__FILE__) + '/../../template/document/' + type.to_s + "/" + type.to_s + ".fox" )
  ProjectBuilder.load( projectname.to_s, template )

end