Class: RailsImporter::Generators::ImporterGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- RailsImporter::Generators::ImporterGenerator
- Defined in:
- lib/generators/rails_importer/importer_generator.rb
Instance Method Summary collapse
Instance Method Details
#add_importer_class ⇒ Object
8 9 10 |
# File 'lib/generators/rails_importer/importer_generator.rb', line 8 def add_importer_class template('importer.rb', "lib/rails_importer/#{file_name}_importer.rb") end |
#add_to_importers ⇒ Object
12 13 14 |
# File 'lib/generators/rails_importer/importer_generator.rb', line 12 def add_to_importers insert_into_file "config/initializers/rails_importer.rb", "\tconfig.importers << #{class_name}Importer\n", :before => "end" end |