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.13 lib/rails/generators/rails/generator/generator_generator.rb
railties-3.1.12 lib/rails/generators/rails/generator/generator_generator.rb
railties-3.2.13.rc2 lib/rails/generators/rails/generator/generator_generator.rb
openskies-0.0.5.2 lib/rails/generators/rails/generator/generator_generator.rb
openskies-0.0.5.1 lib/rails/generators/rails/generator/generator_generator.rb
openskies-0.0.5 lib/rails/generators/rails/generator/generator_generator.rb
openskies-0.0.4 lib/rails/generators/rails/generator/generator_generator.rb
railties-3.2.13.rc1 lib/rails/generators/rails/generator/generator_generator.rb
active_mailer-0.0.5 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
openskies-0.0.3 lib/rails/generators/rails/generator/generator_generator.rb
active_mailer-0.0.4 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
active_mailer-0.0.3 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.12 lib/rails/generators/rails/generator/generator_generator.rb
railties-3.1.11 lib/rails/generators/rails/generator/generator_generator.rb
openskies-0.0.2 lib/rails/generators/rails/generator/generator_generator.rb
openskies-0.0.1 lib/rails/generators/rails/generator/generator_generator.rb
graphael-on-rails-0.5.1 vendor/bundle/gems/railties-3.2.11/lib/rails/generators/rails/generator/generator_generator.rb
graphael-on-rails-0.0.1 vendor/bundle/gems/railties-3.2.11/lib/rails/generators/rails/generator/generator_generator.rb
challah-0.9.1.beta.3 vendor/bundle/gems/railties-3.2.11/lib/rails/generators/rails/generator/generator_generator.rb
devise_sociable-0.1.0 vendor/bundle/gems/railties-3.2.11/lib/rails/generators/rails/generator/generator_generator.rb