Class: Jazz::Generators::Project
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Jazz::Generators::Project
- Includes:
- Thor::Actions
- Defined in:
- lib/jazz/generators/project/project.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/jazz/generators/project/project.rb', line 6 def name @name end |
Class Method Details
.source_root ⇒ Object
8 9 10 |
# File 'lib/jazz/generators/project/project.rb', line 8 def self.source_root File.join(File.dirname(__FILE__)) end |
Instance Method Details
#create ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/jazz/generators/project/project.rb', line 12 def create unless !File.directory?(self.name) say "#{name} already exists" exit 0 end create_project end |
#create_project ⇒ Object
20 21 22 23 |
# File 'lib/jazz/generators/project/project.rb', line 20 def create_project directory "templates/app_root", name template "templates/application.js", "#{name}/config/application.js" end |