Class: QuickTemplater::LayoutGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/quick-templater/layout/layout_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_layoutObject



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 options.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_stylesheetObject



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