Sha256: eee6328614d74583576bc014b4927a4a4c80080bf6c64da54556eeea19cc3f85

Contents?: true

Size: 429 Bytes

Versions: 2

Compression:

Stored size: 429 Bytes

Contents

require 'rails/generators'
module GenesisRails
  class CopyTemplatesGenerator < Rails::Generators::Base
    def self.source_root
      @source_root ||= GenesisRails::Engine.root.join "lib/genesis_rails/templates"
    end

    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
  end
end


Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
genesis_rails-0.0.7 lib/generators/genesis_rails/copy_templates/copy_templates_generator.rb
genesis_rails-0.0.6 lib/generators/genesis_rails/copy_templates/copy_templates_generator.rb