Class: SkyRunner::Generators::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/sky_runner/install/install_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



15
16
17
# File 'lib/generators/sky_runner/install/install_generator.rb', line 15

def self.source_root
  @source_root ||= File.join(File.dirname(__FILE__), 'templates')
end

Instance Method Details

#create_initializer_fileObject

Generator Code. Remember this is just suped-up Thor so methods are executed in order



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

def create_initializer_file
  copy_file "skyrunner.rb", "config/initializers/skyrunner.rb"
end

#create_rake_tasksObject



25
26
27
# File 'lib/generators/sky_runner/install/install_generator.rb', line 25

def create_rake_tasks
  copy_file "skyrunner.rake", "lib/tasks/skyrunner.rake"
end