Class: Mercury::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Mercury::Generators::InstallGenerator
- Defined in:
- lib/generators/mercury/install/install_generator.rb
Instance Method Summary collapse
- #add_routes ⇒ Object
- #copy_config ⇒ Object
- #copy_layout_and_css_overrides ⇒ Object
- #display_readme ⇒ Object
Instance Method Details
#add_routes ⇒ Object
15 16 17 |
# File 'lib/generators/mercury/install/install_generator.rb', line 15 def add_routes route %Q{mount Mercury::Engine => '/'} end |
#copy_config ⇒ Object
11 12 13 |
# File 'lib/generators/mercury/install/install_generator.rb', line 11 def copy_config copy_file 'app/assets/javascripts/mercury.js' end |
#copy_layout_and_css_overrides ⇒ Object
19 20 21 22 23 24 |
# File 'lib/generators/mercury/install/install_generator.rb', line 19 def copy_layout_and_css_overrides if [:full] || yes?("Install the layout file and CSS? [yN]") copy_file 'app/views/layouts/mercury.html.erb' copy_file 'app/assets/stylesheets/mercury.css' end end |
#display_readme ⇒ Object
26 27 28 |
# File 'lib/generators/mercury/install/install_generator.rb', line 26 def display_readme readme 'POST_INSTALL' if behavior == :invoke end |