Class: Syncano::Generators::InstallGenerator

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

Overview

Install generator used for initializing gem in a Rails application

Instance Method Summary collapse

Instance Method Details

#create_initializersObject

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