Class: Frame::Generators::LayoutGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/frame/layout/layout_generator.rb
Instance Method Summary collapse
- #add_default_layout ⇒ Object
- #add_images ⇒ Object
- #add_page_helpers ⇒ Object
- #copy_css ⇒ Object
- #remove_index ⇒ Object
- #replace_html_app ⇒ Object
Methods inherited from Base
Instance Method Details
#add_default_layout ⇒ Object
20 21 22 23 |
# File 'lib/generators/frame/layout/layout_generator.rb', line 20 def add_default_layout template('app/views/layouts/defaults.html.erb') template('app/views/layouts/default_layout.html.erb') end |
#add_images ⇒ Object
29 30 31 32 |
# File 'lib/generators/frame/layout/layout_generator.rb', line 29 def add_images template('app/assets/images/econ_f_64.gif') template('app/assets/images/favicon.ico') end |
#add_page_helpers ⇒ Object
25 26 27 |
# File 'lib/generators/frame/layout/layout_generator.rb', line 25 def add_page_helpers template('app/helpers/application_helper.rb') end |
#copy_css ⇒ Object
39 40 41 42 |
# File 'lib/generators/frame/layout/layout_generator.rb', line 39 def copy_css template('app/assets/stylesheets/frame.css') add_if_missing('app/assets/stylesheets/application.css', " *= require frame\n", :after => " *= require_self\n") end |
#remove_index ⇒ Object
13 14 15 16 17 18 |
# File 'lib/generators/frame/layout/layout_generator.rb', line 13 def remove_index filename="public/index.html" #if File.exists?(filename) and yes?("Would you like to remove '#{filename}'?") remove_file filename #end end |
#replace_html_app ⇒ Object
34 35 36 37 |
# File 'lib/generators/frame/layout/layout_generator.rb', line 34 def replace_html_app @title = Rails.application.class.parent_name template('app/views/layouts/application.html.erb') end |