Class: Plug::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Plug::InstallGenerator
- Defined in:
- lib/generators/plug/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_initializer_file ⇒ Object
7 8 9 |
# File 'lib/generators/plug/install_generator.rb', line 7 def copy_initializer_file copy_file 'plug.rb', 'config/initializers/plug.rb' end |
#mount_engine ⇒ Object
11 12 13 |
# File 'lib/generators/plug/install_generator.rb', line 11 def mount_engine inject_into_file('config/routes.rb', "\n mount Plug::Engine => '/plug', as: 'plug'\n\n", before: /^end/) end |