Class: Mercury::Generators::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/mercury/install/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#add_routesObject


15
16
17
# File 'lib/generators/mercury/install/install_generator.rb', line 15

def add_routes
  route %Q{mount Mercury::Engine => '/'}
end

#copy_configObject


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_overridesObject


19
20
21
22
23
24
# File 'lib/generators/mercury/install/install_generator.rb', line 19

def copy_layout_and_css_overrides
  if options[: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_readmeObject


26
27
28
# File 'lib/generators/mercury/install/install_generator.rb', line 26

def display_readme
  readme 'POST_INSTALL' if behavior == :invoke
end