Sha256: 567d0049804ef9cb982d25da084cff72635a002e589d3ce5320a89432cbf247c

Contents?: true

Size: 600 Bytes

Versions: 11

Compression:

Stored size: 600 Bytes

Contents

module Bookshop
  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", file_name)
          else
            File.join("lib", "generators")
          end
        end

    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
bookshop-0.0.14 lib/bookshop/generators/bookshop/generator/generator_generator.rb
bookshop-0.0.13 lib/bookshop/generators/bookshop/generator/generator_generator.rb
bookshop-0.0.12 lib/bookshop/generators/bookshop/generator/generator_generator.rb
bookshop-0.0.11 lib/bookshop/generators/bookshop/generator/generator_generator.rb
bookshop-0.0.9.1 lib/bookshop/generators/bookshop/generator/generator_generator.rb
bookshop-0.0.9 lib/bookshop/generators/bookshop/generator/generator_generator.rb
bookshop-0.0.4 lib/bookshop/generators/bookshop/generator/generator_generator.rb
bookshop-0.0.3 lib/bookshop/generators/bookshop/generator/generator_generator.rb
bookshop-0.0.2.1 lib/bookshop/generators/bookshop/generator/generator_generator.rb
bookshop-0.0.2 lib/bookshop/generators/bookshop/generator/generator_generator.rb
bookshop-0.0.1 lib/bookshop/generators/bookshop/generator/generator_generator.rb