Class: CanonicalRails::InstallGenerator

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_pathsObject



4
5
6
7
8
9
10
# File 'lib/generators/canonical_rails/install/install_generator.rb', line 4

def self.source_paths
  paths = []
  paths << File.expand_path('../templates', "../../#{__FILE__}")
  paths << File.expand_path('../templates', "../#{__FILE__}")
  paths << File.expand_path('../templates', __FILE__)
  paths.flatten
end

Instance Method Details

#add_filesObject



12
13
14
# File 'lib/generators/canonical_rails/install/install_generator.rb', line 12

def add_files
  template 'canonical_rails.rb', 'config/initializers/canonical_rails.rb'
end