Class: Panda::Core::Generators::TemplatesGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Panda::Core::Generators::TemplatesGenerator
- Includes:
- Thor::Actions
- Defined in:
- lib/generators/panda/core/templates_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_templates ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/generators/panda/core/templates_generator.rb', line 15 def copy_templates Dir.glob(File.join(self.class.source_root, "**/{.*,*}"), File::FNM_DOTMATCH).each do |file| next if File.directory?(file) next if File.basename(file) == "." || File.basename(file) == ".." relative_path = Pathname.new(file).relative_path_from(Pathname.new(self.class.source_root)).to_s copy_file relative_path end end |