Class: Bootswitch::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Bootswitch::InstallGenerator
- Includes:
- Generators::Utils
- Defined in:
- lib/generators/bootswitch/install/install_generator.rb
Instance Method Summary collapse
- #add_route ⇒ Object
- #hello ⇒ Object
-
#install_initializer ⇒ Object
all public methods in here will be run in order.
Methods included from Generators::Utils
Instance Method Details
#add_route ⇒ Object
17 18 19 20 21 |
# File 'lib/generators/bootswitch/install/install_generator.rb', line 17 def add_route output "Adding Bootswitch to your routes.rb file", :magenta gsub_file "config/routes.rb", /mount Bootswitch::Engine => '\/bootswatch\/', :as => 'bootswitch'/, '' route("mount Bootswitch::Engine => '/bootswatch/', :as => 'bootswitch'") end |
#hello ⇒ Object
7 8 9 |
# File 'lib/generators/bootswitch/install/install_generator.rb', line 7 def hello output "Welcome to the Bootswitch gem's installation process.", :magenta end |
#install_initializer ⇒ Object
all public methods in here will be run in order
12 13 14 15 |
# File 'lib/generators/bootswitch/install/install_generator.rb', line 12 def install_initializer output "This installs a basic initializer where you can set the method that stores the name of the bootswatch bootswatch to be displayed.", :magenta template "initializer.rb", "config/initializers/bootswitch.rb" end |