Class: Crt::CrtGenerator
- Inherits:
-
Rails::Generators::AppGenerator
- Object
- Rails::Generators::AppGenerator
- Crt::CrtGenerator
- Defined in:
- lib/crt.rb
Instance Method Summary collapse
- #customize_gemfile ⇒ Object
- #finish_template ⇒ Object
- #import_template ⇒ Object
- #setup_database ⇒ Object
Instance Method Details
#customize_gemfile ⇒ Object
23 24 25 |
# File 'lib/crt.rb', line 23 def customize_gemfile build :replace_gemfile end |
#finish_template ⇒ Object
12 13 14 15 16 |
# File 'lib/crt.rb', line 12 def finish_template invoke :import_template invoke :setup_database super end |
#import_template ⇒ Object
18 19 20 21 |
# File 'lib/crt.rb', line 18 def import_template remove_file 'Gemfile' template 'Gemfile.erb', 'Gemfile' end |
#setup_database ⇒ Object
27 28 29 30 31 32 33 |
# File 'lib/crt.rb', line 27 def setup_database if 'mysql' == [:database] build :use_mysql2_template end end |