Sha256: 6675168eb0c069777ac8a33368b0c68adcf00de94fe5fb4590cac210851c157e

Contents?: true

Size: 579 Bytes

Versions: 6

Compression:

Stored size: 579 Bytes

Contents

class Syncano
  # Module for generators used implemented in the gem
  module Generators
    # Install generator used for initializing gem in a Rails application
    class InstallGenerator < Rails::Generators::Base
      source_root File.expand_path("../templates", __FILE__)

      # Copies templates for initializers
      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
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
syncano-3.1.4 lib/generators/syncano/install_generator.rb
syncano-3.1.3 lib/generators/syncano/install_generator.rb
syncano-3.1.2 lib/generators/syncano/install_generator.rb
syncano-3.1.1 lib/generators/syncano/install_generator.rb
syncano-3.1.1.beta5 lib/generators/syncano/install_generator.rb
syncano-3.1.1.beta4 lib/generators/syncano/install_generator.rb