Class: Abraham::Generators::InstallGenerator
- Inherits:
-
ActiveRecord::Generators::Base
- Object
- ActiveRecord::Generators::Base
- Abraham::Generators::InstallGenerator
- Defined in:
- lib/generators/abraham/install_generator.rb
Instance Method Summary collapse
-
#copy_files ⇒ Object
Copies the migration template to db/migrate.
- #create_config ⇒ Object
- #create_initializer ⇒ Object
Instance Method Details
#copy_files ⇒ Object
Copies the migration template to db/migrate.
18 19 20 21 22 |
# File 'lib/generators/abraham/install_generator.rb', line 18 def copy_files return if ["skip-migration"] migration_template "migration.rb", "db/migrate/create_abraham_histories.rb" end |
#create_config ⇒ Object
30 31 32 33 34 |
# File 'lib/generators/abraham/install_generator.rb', line 30 def create_config return if ["skip-config"] copy_file "abraham.yml", "config/abraham.yml" end |
#create_initializer ⇒ Object
24 25 26 27 28 |
# File 'lib/generators/abraham/install_generator.rb', line 24 def create_initializer return if ["skip-initializer"] copy_file "initializer.rb", "config/initializers/abraham.rb" end |