Class: LayoutGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- LayoutGenerator
- Defined in:
- lib/generators/layout/layout_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_layout_file ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/generators/layout/layout_generator.rb', line 7 def copy_layout_file layout_name = file_name empty_directory "public/#{layout_name}" directory "#{layout_name}/images", "public/#{layout_name}/images" copy_file "#{layout_name}/styles.css", "public/#{layout_name}/styles.css" copy_file "#{layout_name}/index.html", "public/#{layout_name}/index.html" copy_file "#{layout_name}/#{layout_name}.html.erb", "app/views/layouts/#{layout_name}.html.erb" end |