Class: GitWit::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- GitWit::InstallGenerator
- Defined in:
- lib/generators/git_wit/install/install_generator.rb
Instance Method Summary collapse
- #copy_initializer ⇒ Object
-
#initialize(args, *options) ⇒ InstallGenerator
constructor
A new instance of InstallGenerator.
- #mount_route ⇒ Object
- #show_readme ⇒ Object
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, *) super parse_attributes! if respond_to?(:attributes) end |
Instance Method Details
#copy_initializer ⇒ Object
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_route ⇒ Object
20 21 22 |
# File 'lib/generators/git_wit/install/install_generator.rb', line 20 def mount_route route 'mount GitWit::Engine => "/"' end |
#show_readme ⇒ Object
16 17 18 |
# File 'lib/generators/git_wit/install/install_generator.rb', line 16 def show_readme readme "README" if behavior == :invoke end |