Class: RPlusPlus::Commands::New
- Inherits:
-
Object
- Object
- RPlusPlus::Commands::New
- Defined in:
- lib/rplusplus/commands/new.rb
Class Method Summary collapse
Class Method Details
.call(project_name, *args) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/rplusplus/commands/new.rb', line 6 def self.call project_name, *args FileUtils.mkdir project_name File.write("#{project_name}/#{project_name.underscore}.cpp", main_erb.result(binding)) File.write("#{project_name}/Rakefile", rakefile_erb.result(binding)) File.write("#{project_name}/.gitignore", gitignore_erb.result(binding)) end |