Class: GGem::Template
- Inherits:
-
Object
- Object
- GGem::Template
- Defined in:
- lib/ggem/template.rb
Instance Method Summary collapse
-
#initialize(ggem) ⇒ Template
constructor
A new instance of Template.
- #save ⇒ Object
Constructor Details
#initialize(ggem) ⇒ Template
Returns a new instance of Template.
8 9 10 |
# File 'lib/ggem/template.rb', line 8 def initialize(ggem) @gem = ggem end |
Instance Method Details
#save ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/ggem/template.rb', line 12 def save save_folder # (gem root path) save_folder "lib/#{@gem.ruby_name}" save_folder "test/support" save_folder "test/system" save_folder "test/unit" save_folder "log" save_folder "tmp" save_file('gitignore.erb', '.gitignore') save_file('Gemfile.erb', 'Gemfile') save_file('gemspec.erb', "#{@gem.name}.gemspec") save_file('README.md.erb', 'README.md') save_file('LICENSE.erb', 'LICENSE') save_file('lib.rb.erb', "lib/#{@gem.ruby_name}.rb") save_file('lib_version.rb.erb', "lib/#{@gem.ruby_name}/version.rb") save_file('test_helper.rb.erb', 'test/helper.rb') save_file('test_support_factory.rb.erb', 'test/support/factory.rb') save_empty_file('log/.gitkeep') save_empty_file('tmp/.gitkeep') end |