Class: Overlook::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Overlook::InstallGenerator
- Defined in:
- lib/generators/overlook/install/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#add_namespace ⇒ Object
5 6 7 8 9 |
# File 'lib/generators/overlook/install/install_generator.rb', line 5 def add_namespace inject_into_file 'config/routes.rb', "\n namespace :admin do\n end\n", { after: /routes.draw do$/ } end |
#install_files ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/generators/overlook/install/install_generator.rb', line 11 def install_files source = self.class.source_root Dir["#{source}/**/*"].each do |file| next if File.directory?(file) path = file.gsub(source, '').gsub(/^\//, '') copy_file path, "app/#{path}" end end |