Sha256: c293b17b90a7931fe0a41b3018d614b9f79ef2b748fab933931063101f5318e8

Contents?: true

Size: 637 Bytes

Versions: 188

Compression:

Stored size: 637 Bytes

Contents

module Rails
  module Generators
    class GeneratorGenerator < NamedBase
      check_class_collision :suffix => "Generator"

      class_option :namespace, :type => :boolean, :default => true,
                               :desc => "Namespace generator under lib/generators/name"

      def create_generator_files
        directory '.', generator_dir
      end

      protected

        def generator_dir
          if options[:namespace]
            File.join("lib", "generators", regular_class_path, file_name)
          else
            File.join("lib", "generators", regular_class_path)
          end
        end

    end
  end
end

Version data entries

188 entries across 149 versions & 19 rubygems

Version Path
railties-3.2.22.5 lib/rails/generators/rails/generator/generator_generator.rb
railties-3.2.22.4 lib/rails/generators/rails/generator/generator_generator.rb
railties-3.2.22.3 lib/rails/generators/rails/generator/generator_generator.rb
railties-3.2.22.2 lib/rails/generators/rails/generator/generator_generator.rb
railties-3.2.22.1 lib/rails/generators/rails/generator/generator_generator.rb
active_mailer-0.0.10 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/generators/rails/generator/generator_generator.rb
railties-3.2.22 lib/rails/generators/rails/generator/generator_generator.rb
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/railties-3.2.12/lib/rails/generators/rails/generator/generator_generator.rb
railties-3.2.21 lib/rails/generators/rails/generator/generator_generator.rb
railties-3.2.20 lib/rails/generators/rails/generator/generator_generator.rb
railties-3.2.19 lib/rails/generators/rails/generator/generator_generator.rb
railties-3.2.18 lib/rails/generators/rails/generator/generator_generator.rb
railties-3.2.17 lib/rails/generators/rails/generator/generator_generator.rb
railties-3.2.16 lib/rails/generators/rails/generator/generator_generator.rb
railties-3.2.15 lib/rails/generators/rails/generator/generator_generator.rb
railties-3.2.15.rc3 lib/rails/generators/rails/generator/generator_generator.rb
railties-3.2.15.rc2 lib/rails/generators/rails/generator/generator_generator.rb
railties-3.2.15.rc1 lib/rails/generators/rails/generator/generator_generator.rb
railties-3.2.14 lib/rails/generators/rails/generator/generator_generator.rb
railties-3.2.14.rc2 lib/rails/generators/rails/generator/generator_generator.rb