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
backbone-queryparams-rails-0.0.1 vendor/bundle/gems/railties-3.2.11/lib/rails/generators/rails/generator/generator_generator.rb
railscast-assets-0.0.2 vendor/bundle/gems/backbone-forms-on-rails-0.10.0/vendor/bundle/gems/railties-3.2.11/lib/rails/generators/rails/generator/generator_generator.rb
railscast-assets-0.0.2 vendor/bundle/gems/railties-3.2.11/lib/rails/generators/rails/generator/generator_generator.rb
backbone-forms-on-rails-0.10.0 vendor/bundle/gems/railties-3.2.11/lib/rails/generators/rails/generator/generator_generator.rb
backbone-forms-on-rails-0.10.0 vendor/bundle/gems/backbone-forms-on-rails-0.10.0/vendor/bundle/gems/railties-3.2.11/lib/rails/generators/rails/generator/generator_generator.rb
backbone-deep-rails-0.0.1 vendor/bundle/gems/railties-3.2.11/lib/rails/generators/rails/generator/generator_generator.rb
challah-0.9.1.beta vendor/bundle/gems/railties-3.2.11/lib/rails/generators/rails/generator/generator_generator.rb
railties-3.2.11 lib/rails/generators/rails/generator/generator_generator.rb
railties-3.1.10 lib/rails/generators/rails/generator/generator_generator.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/generators/rails/generator/generator_generator.rb
challah-0.9.0 vendor/bundle/gems/railties-3.2.9/lib/rails/generators/rails/generator/generator_generator.rb
railties-3.2.10 lib/rails/generators/rails/generator/generator_generator.rb
railties-3.1.9 lib/rails/generators/rails/generator/generator_generator.rb
jquery_regex-0.0.3 vendor/bundle/gems/jquery_regex-0.0.3/vendor/bundle/gems/jquery_regex-0.0.1/vendor/bundle/gems/railties-3.2.9/lib/rails/generators/rails/generator/generator_generator.rb
jquery_regex-0.0.3 vendor/bundle/gems/jquery_regex-0.0.3/vendor/bundle/gems/jquery_regex-0.0.2/vendor/bundle/gems/jquery_regex-0.0.1/vendor/bundle/gems/railties-3.2.9/lib/rails/generators/rails/generator/generator_generator.rb
jquery_regex-0.0.3 vendor/bundle/gems/jquery_regex-0.0.1/vendor/bundle/gems/railties-3.2.9/lib/rails/generators/rails/generator/generator_generator.rb
jquery_regex-0.0.3 vendor/bundle/gems/jquery_regex-0.0.2/vendor/bundle/gems/jquery_regex-0.0.1/vendor/bundle/gems/railties-3.2.9/lib/rails/generators/rails/generator/generator_generator.rb
jquery_regex-0.0.3 vendor/bundle/gems/jquery_regex-0.0.3/vendor/bundle/gems/jquery_regex-0.0.2/vendor/bundle/gems/railties-3.2.9/lib/rails/generators/rails/generator/generator_generator.rb
jquery_regex-0.0.3 vendor/bundle/gems/railties-3.2.9/lib/rails/generators/rails/generator/generator_generator.rb
jquery_regex-0.0.3 vendor/bundle/gems/jquery_regex-0.0.2/vendor/bundle/gems/railties-3.2.9/lib/rails/generators/rails/generator/generator_generator.rb