Class: DeluxePublisher::BaseGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/deluxe_publisher/base/base_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_imagesObject



35
36
37
38
39
# File 'lib/generators/deluxe_publisher/base/base_generator.rb', line 35

def copy_images
  Dir["#{BaseGenerator.source_root}/images/*"].each do |file|
    copy_file file, "#{Rails.root}/public/images/deluxe_publisher/#{File.basename(file)}", :verbose => true
  end
end

#copy_initializerObject

To change this template use File | Settings | File Templates.



6
7
8
# File 'lib/generators/deluxe_publisher/base/base_generator.rb', line 6

def copy_initializer
  copy_file "#{BaseGenerator.source_root}/initializer.rb", "#{Rails.root}/config/initializers/deluxe_publisher.rb"
end

#copy_javascriptsObject



23
24
25
26
27
# File 'lib/generators/deluxe_publisher/base/base_generator.rb', line 23

def copy_javascripts
  Dir["#{BaseGenerator.source_root}/javascripts/*"].each do |file|
    copy_file file, "#{Rails.root}/public/javascripts/#{File.basename(file)}", :verbose => true
  end
end

#copy_layoutsObject



11
12
13
14
15
# File 'lib/generators/deluxe_publisher/base/base_generator.rb', line 11

def copy_layouts
  Dir["#{BaseGenerator.source_root}/layouts/*"].each do |file|
    copy_file file, "#{Rails.root}/app/views/layouts/#{File.basename(file)}", :verbose => true
  end
end

#copy_style_sheetsObject



29
30
31
32
33
# File 'lib/generators/deluxe_publisher/base/base_generator.rb', line 29

def copy_style_sheets
  Dir["#{BaseGenerator.source_root}/stylesheets/*"].each do |file|
    copy_file file, "#{Rails.root}/public/stylesheets/#{File.basename(file)}", :verbose => true
  end
end

#copy_templatesObject



17
18
19
20
21
# File 'lib/generators/deluxe_publisher/base/base_generator.rb', line 17

def copy_templates
  Dir["#{BaseGenerator.source_root}/templates/*"].each do |file|
    copy_file file, "#{Rails.root}/app/views/deluxe_publisher/templates/#{File.basename(file)}", :verbose => true
  end
end