Class: LayoutGenerator

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

Instance Method Summary collapse

Instance Method Details

#generate_layoutObject

Every pubic method gets called when the generator is run



7
8
9
10
# File 'lib/generators/layout/layout_generator.rb', line 7

def generate_layout
  copy_file "blank-stylesheet.css", "public/stylesheets/#{file_name}.css" if options.stylesheets?
  template "haml-layout.erb", "app/views/layouts/#{file_name}.haml"
end