Class: CrawlerEngineGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- CrawlerEngineGenerator
- Extended by:
- ActiveRecord::Generators::Migration
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/crawler_engine_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
10 11 12 |
# File 'lib/generators/crawler_engine_generator.rb', line 10 def self.source_root File.('../templates', __FILE__) end |
Instance Method Details
#crate_model_file ⇒ Object
18 19 20 21 |
# File 'lib/generators/crawler_engine_generator.rb', line 18 def crate_model_file template 'post.rb', 'app/models/post.rb' template 'source.rb', 'app/models/source.rb' end |
#create_migration_file ⇒ Object
14 15 16 |
# File 'lib/generators/crawler_engine_generator.rb', line 14 def create_migration_file migration_template 'migration.rb', 'db/migrate/create_crawler_engine' end |