def generate
      constants = inspector.inspect_constants(
        inspector.constant,
        options[:ignore].dup
      )

      constants = constants.sort

      group_constants(constants).each do |root, names|
        filepath  = File.join(directory, "#{root.snake_case}.rb")
        constants = []

        if File.file?(filepath) and !options[:overwrite]
          next
        end

        names.each do |name|
          current_inspector = Inspector.new(name)
          inspected_methods = inspect_methods(current_inspector)
          superclass        = nil

          if current_inspector.inspect_superclass
            superclass = current_inspector.inspect_superclass.to_s
          end

          constant = GeneratedConstant.new(
            :name       => current_inspector.constant_name,
            :constant   => current_inspector.constant,
            :methods    => method_information(inspected_methods),
            :superclass => superclass,

            # Kernel is ignored since its included already in core/object.rb
            :modules    => current_inspector.inspect_modules - [Kernel]
          )

          constants << constant
        end

        render_template(filepath, template, constants)
      end
    end
def generate
      constants = inspector.inspect_constants(
        inspector.constant,
        options[:ignore].dup
      )

      constants = constants.sort

      group_constants(constants).each do |root, names|
        filepath  = File.join(directory, "#{root.snake_case}.rb")
        constants = []

        if File.file?(filepath) and !options[:overwrite]
          next
        end

        names.each do |name|
          current_inspector = Inspector.new(name)
          inspected_methods = inspect_methods(current_inspector)
          superclass        = nil

          if current_inspector.inspect_superclass
            superclass = current_inspector.inspect_superclass.to_s
          end

          constant = GeneratedConstant.new(
            :name       => current_inspector.constant_name,
            :constant   => current_inspector.constant,
            :methods    => method_information(inspected_methods),
            :superclass => superclass,

            # Kernel is ignored since its included already in core/object.rb
            :modules    => current_inspector.inspect_modules - [Kernel]
          )

          constants << constant
        end

        render_template(filepath, template, constants)
      end
    end
@param [Class] constant
 @param [String] directory
 @param [Hash] options


 Generates the definitions for every constant.