Class: GitWit::InstallGenerator

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

Instance Method Summary collapse

Constructor Details

#initialize(args, *options) ⇒ InstallGenerator

Returns a new instance of InstallGenerator.



7
8
9
10
# File 'lib/generators/git_wit/install/install_generator.rb', line 7

def initialize(args, *options)
  super
  parse_attributes! if respond_to?(:attributes)
end

Instance Method Details

#copy_initializerObject



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

def copy_initializer
  template "git_wit.rb", "config/initializers/git_wit.rb"
end

#mount_routeObject



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

def mount_route
  route 'mount GitWit::Engine => "/"'
end

#show_readmeObject



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

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