Class: Genit::ProjectCreator

Inherits:
Object
  • Object
show all
Defined in:
lib/genit/project/project_creator.rb

Overview

Create a skeleton project.

Instance Method Summary collapse

Constructor Details

#initialize(name, doctype, empty) ⇒ ProjectCreator

Sole constructor.

name - The String name of the future project folder. doctype - The String document type definition. empty - A Boolean telling if we produce a smoke test or not.



16
17
18
19
20
# File 'lib/genit/project/project_creator.rb', line 16

def initialize name, doctype, empty
  @project_name = name
  @doctype = doctype
  @empty = empty
end

Instance Method Details

#createObject

Public: Create the structure of the project, that is many files and folders.

Returns nothing.



26
27
28
29
30
31
32
# File 'lib/genit/project/project_creator.rb', line 26

def create
  begin
    create_the_project
  rescue SystemCallError
    puts "Cannot create project..."
  end
end