Class: Astrochimp::Generators::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#add_astrochimp_routesObject



16
17
18
# File 'lib/generators/astrochimp/install_generator.rb', line 16

def add_astrochimp_routes
  route 'mount Astrochimp::Engine => "/"'
end

#copy_config_ymlObject



8
9
10
# File 'lib/generators/astrochimp/install_generator.rb', line 8

def copy_config_yml
  copy_file "../../../config/astrochimp.example.yml", "config/astrochimp.yml"
end

#copy_default_layoutObject



12
13
14
# File 'lib/generators/astrochimp/install_generator.rb', line 12

def copy_default_layout
  copy_file "../../templates/astrochimp.html.erb", "app/views/layouts/astrochimp.html.erb"
end

#show_readmeObject



20
21
22
# File 'lib/generators/astrochimp/install_generator.rb', line 20

def show_readme
  readme "README" if behavior == :invoke
end