Class: GenesisRails::CopyTemplatesGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- GenesisRails::CopyTemplatesGenerator
- Defined in:
- lib/generators/genesis_rails/copy_templates/copy_templates_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
4 5 6 |
# File 'lib/generators/genesis_rails/copy_templates/copy_templates_generator.rb', line 4 def self.source_root @source_root ||= GenesisRails::Engine.root.join "lib/genesis_rails/templates" end |
Instance Method Details
#copy_template_files ⇒ Object
8 9 10 11 12 13 |
# File 'lib/generators/genesis_rails/copy_templates/copy_templates_generator.rb', line 8 def copy_template_files root = self.class.source_root Dir[root.join "**/*.*"].each do |file| copy_file file, "lib/templates/#{file.gsub(root.to_s, "")}" end end |