Class: Ichiban::ProjectGenerator
- Inherits:
-
Object
- Object
- Ichiban::ProjectGenerator
- Defined in:
- lib/ichiban/project_generator.rb
Instance Method Summary collapse
-
#empty_project_path ⇒ Object
The path to the empty project template in the Ichiban gem directory.
- #generate ⇒ Object
-
#initialize(path) ⇒ ProjectGenerator
constructor
A new instance of ProjectGenerator.
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_path ⇒ Object
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.(File.join(File.dirname(__FILE__), '../../empty_project')) end |
#generate ⇒ Object
12 13 14 |
# File 'lib/ichiban/project_generator.rb', line 12 def generate FileUtils.cp_r(empty_project_path, @path) end |