Class: Project
- Inherits:
-
Erebus::NamedGenerator
- Object
- Thor::Group
- Erebus::Generator
- Erebus::NamedGenerator
- Project
- Defined in:
- lib/erebus/generators/project.rb
Class Method Summary collapse
Instance Method Summary collapse
- #add_testing_framework ⇒ Object
- #create_erebus_file ⇒ Object
- #create_git_ignore ⇒ Object
- #create_include_dir ⇒ Object
- #create_main_file ⇒ Object
- #create_rake_file ⇒ Object
Methods inherited from Erebus::Generator
Class Method Details
.source_root ⇒ Object
7 8 9 |
# File 'lib/erebus/generators/project.rb', line 7 def self.source_root File.dirname(__FILE__) end |
Instance Method Details
#add_testing_framework ⇒ Object
28 29 30 31 32 |
# File 'lib/erebus/generators/project.rb', line 28 def add_testing_framework if [:testing] invoke "setup_test", ["#{class_name}"] end end |
#create_erebus_file ⇒ Object
24 25 26 |
# File 'lib/erebus/generators/project.rb', line 24 def create_erebus_file template "templates/project.erebus.erb", "#{class_name}/.erebus" end |
#create_git_ignore ⇒ Object
14 15 16 |
# File 'lib/erebus/generators/project.rb', line 14 def create_git_ignore template "templates/ignore.erb", "#{class_name}/.gitignore" end |
#create_include_dir ⇒ Object
17 18 19 |
# File 'lib/erebus/generators/project.rb', line 17 def create_include_dir create_file "#{class_name}/include/.gitkeep" end |
#create_main_file ⇒ Object
20 21 22 |
# File 'lib/erebus/generators/project.rb', line 20 def create_main_file template "templates/main.cpp.erb", "#{class_name}/src/main.cpp" end |
#create_rake_file ⇒ Object
11 12 13 |
# File 'lib/erebus/generators/project.rb', line 11 def create_rake_file template "templates/rake.erb", "#{class_name}/Rakefile" end |