Class: BootstrapRainbow::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- BootstrapRainbow::Generators::InstallGenerator
- Defined in:
- lib/generators/bootstrap_rainbow/install/install_generator.rb
Instance Attribute Summary collapse
-
#app_name ⇒ Object
readonly
Returns the value of attribute app_name.
Instance Method Summary collapse
Instance Attribute Details
#app_name ⇒ Object (readonly)
Returns the value of attribute app_name.
10 11 12 |
# File 'lib/generators/bootstrap_rainbow/install/install_generator.rb', line 10 def app_name @app_name end |
Instance Method Details
#generate_install ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/generators/bootstrap_rainbow/install/install_generator.rb', line 12 def generate_install app = ::Rails.application @app_name = app.class.to_s.split("::").first template "layout.html.erb", "app/views/layouts/#{layout_name}.html.erb" template "sidebar.html.erb", "app/views/rainbow/_sidebar_nav.html.erb" template "breadcrumb.html.erb", "app/views/rainbow/_breadcrumb.html.erb" end |