Class: DeluxePublisher::BaseGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- DeluxePublisher::BaseGenerator
- Defined in:
- lib/generators/deluxe_publisher/base/base_generator.rb
Instance Method Summary collapse
- #copy_images ⇒ Object
-
#copy_initializer ⇒ Object
To change this template use File | Settings | File Templates.
- #copy_javascripts ⇒ Object
- #copy_layouts ⇒ Object
- #copy_style_sheets ⇒ Object
- #copy_templates ⇒ Object
Instance Method Details
#copy_images ⇒ Object
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_initializer ⇒ Object
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_javascripts ⇒ Object
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_layouts ⇒ Object
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_sheets ⇒ Object
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_templates ⇒ Object
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 |