Class: Facteur::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Facteur::Generators::InstallGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/facteur/install/install_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number ⇒ Object
13 14 15 |
# File 'lib/generators/facteur/install/install_generator.rb', line 13 def self.next_migration_number Time.now.utc.strftime("%Y%m%d%H%M%S") end |
.source_root ⇒ Object
9 10 11 |
# File 'lib/generators/facteur/install/install_generator.rb', line 9 def self.source_root @source_root ||= File.(File.join(File.dirname(__FILE__), 'templates')) end |
Instance Method Details
#create_facteur_files ⇒ Object
18 19 20 21 22 |
# File 'lib/generators/facteur/install/install_generator.rb', line 18 def create_facteur_files template 'create_messages.rb', "db/migrate/#{self.class.next_migration_number}_create_messages.rb" sleep(1) template 'create_mailboxes.rb', "db/migrate/#{self.class.next_migration_number}_create_mailboxes.rb" end |