Sha256: 6ae7f65adc72a5eab95e319e34ee005fcd645a1f18144b977027bf124d6e9cd4

Contents?: true

Size: 585 Bytes

Versions: 1

Compression:

Stored size: 585 Bytes

Contents

module Clearest
  class FilesCopyGenerator < AbstractGenerator
    def initialize(_options = {})
      super _options
      @options[:list_folder].each do |folder|
        files = Dir.glob("#{@template_root}/#{folder}/*").reject {|file| (file =~ /.tpl$/ or File::directory? file) }
        files.each do |file|
          fullpath = "#{@options[:target_path]}/#{@options[:project_name]}/#{folder}"
          puts "     #{'copying'.colorize(:light_green)}  (file)       #{fullpath}/#{File.basename(file)}"
          FileUtils::copy file, fullpath
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
clearest-0.0.1a lib/clearest/generators/2_files_copy.rb