Class: RunShell::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
Rails::Generators::Migration
Defined in:
lib/generators/run_shell/install_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.next_migration_number(dirname) ⇒ Object



21
22
23
# File 'lib/generators/run_shell/install_generator.rb', line 21

def self.next_migration_number(dirname)
  ActiveRecord::Generators::Base.next_migration_number(dirname)
end

Instance Method Details

#copy_initializerObject



17
18
19
# File 'lib/generators/run_shell/install_generator.rb', line 17

def copy_initializer
  template "run_shell.rb", "config/initializers/run_shell.rb"
end

#create_migration_fileObject



13
14
15
# File 'lib/generators/run_shell/install_generator.rb', line 13

def create_migration_file
  migration_template 'create_shells.rb', 'db/migrate/create_shells.rb'
end