Class: QuickTemplater::LayoutGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- QuickTemplater::LayoutGenerator
- Defined in:
- lib/generators/quick-templater/layout/layout_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_layout ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/generators/quick-templater/layout/layout_generator.rb', line 15 def copy_layout layout = "#{options.template.underscore}.html.erb" case .engine when 'erb' template layout, "app/views/layouts/#{layout_name.underscore}.html.erb" when 'haml' generate_haml_layout layout when 'slim' generate_slim_layout layout end end |
#copy_template_stylesheet ⇒ Object
27 28 29 |
# File 'lib/generators/quick-templater/layout/layout_generator.rb', line 27 def copy_template_stylesheet template "quick-templater.css.erb", "app/assets/stylesheets/quick-templater.css" end |