Class: Titanic::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#installObject



4
5
6
7
8
# File 'lib/generators/titanic/install_generator.rb', line 4

def install
  # Load rake tasks into project
  content = 'spec = Gem::Specification.find_by_name "titanic-db"' + "\n" + 'load "#{spec.gem_dir}/lib/tasks/titanic.rake"'
  append_to_file 'Rakefile', content
end