Class: Ichiban::ProjectGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/ichiban/project_generator.rb

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ ProjectGenerator

Returns a new instance of ProjectGenerator.



8
9
10
# File 'lib/ichiban/project_generator.rb', line 8

def initialize(path)
  @path = path
end

Instance Method Details

#empty_project_pathObject

The path to the empty project template in the Ichiban gem directory



4
5
6
# File 'lib/ichiban/project_generator.rb', line 4

def empty_project_path
  File.expand_path(File.join(File.dirname(__FILE__), '../../empty_project'))
end

#generateObject



12
13
14
# File 'lib/ichiban/project_generator.rb', line 12

def generate
  FileUtils.cp_r(empty_project_path, @path)
end