Class: Sooner::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Sooner::InstallGenerator
- Defined in:
- lib/generators/sooner/install/install_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#copy_initializer ⇒ Object
def create_migration_file migration_template ‘migration.rb’, ‘db/migrate/sooner_create_subscribers.rb’ end.
- #show_readme ⇒ Object
Class Method Details
.source_root ⇒ Object
6 7 8 |
# File 'lib/generators/sooner/install/install_generator.rb', line 6 def self.source_root @_sooner_source_root ||= File.("../templates", __FILE__) end |
Instance Method Details
#copy_initializer ⇒ Object
def create_migration_file
migration_template 'migration.rb', 'db/migrate/sooner_create_subscribers.rb'
end
29 30 31 |
# File 'lib/generators/sooner/install/install_generator.rb', line 29 def copy_initializer template "sooner.rb", "config/initializers/sooner.rb" end |
#show_readme ⇒ Object
33 34 35 |
# File 'lib/generators/sooner/install/install_generator.rb', line 33 def show_readme readme "README" end |