Class: Telm::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Telm::Generators::InstallGenerator
- Defined in:
- lib/generators/telm/install/install_generator.rb
Constant Summary collapse
- DEFAULT_ROUTE =
"/telm"
Instance Method Summary collapse
Instance Method Details
#add_mount ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/generators/telm/install/install_generator.rb', line 17 def add_mount if existing_mount_path say_status :skip, "telm is already mounted at #{mount_path} in config/routes.rb", :yellow else route %(mount Telm::Engine => "#{mount_path}") end end |
#announce ⇒ Object
29 30 31 |
# File 'lib/generators/telm/install/install_generator.rb', line 29 def announce say "✓ telm mounted at #{mount_path} — start your server and visit http://localhost:3000#{mount_path}" end |
#create_initializer ⇒ Object
25 26 27 |
# File 'lib/generators/telm/install/install_generator.rb', line 25 def create_initializer template "initializer.rb.tt", "config/initializers/telm.rb" end |