Class: Envrobots::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Envrobots::Generators::InstallGenerator
- Defined in:
- lib/generators/envrobots/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_robots ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/generators/envrobots/install_generator.rb', line 6 def copy_robots path = Rails.root.join('public', 'robots.txt') if File.file? path copy_file path, 'config/robots/robots.production.txt' remove_file path else copy_file 'robots.production.txt', 'config/robots/robots.production.txt' end copy_file 'robots.other.txt', 'config/robots/robots.other.txt' end |