Class: Syncano::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Syncano::Generators::InstallGenerator
- Defined in:
- lib/generators/syncano/install_generator.rb
Overview
Install generator used for initializing gem in a Rails application
Instance Method Summary collapse
-
#create_initializers ⇒ Object
Copies templates for initializers.
Instance Method Details
#create_initializers ⇒ Object
Copies templates for initializers
9 10 11 12 13 14 |
# File 'lib/generators/syncano/install_generator.rb', line 9 def create_initializers Dir["#{self.class.source_root}/initializers/*.rb"].each do |filepath| name = File.basename(filepath) template "initializers/#{name}", "config/initializers/#{name}" end end |