Commit 41888aa4 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Improve Format::Class docs.

parent b4aee782
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ module JsDuck
        assets.images.report_unused
      end

      # Factory method to create new ClassFormatter instances.
      # Factory method to create new Format::Class instances.
      def self.create_class_formatter(relations, opts)
        doc_formatter = Format::Doc.new(relations, opts)
        doc_formatter.images = Img::DirSet.new(opts.images, "images")
+10 −2
Original line number Diff line number Diff line
@@ -3,8 +3,16 @@ require 'jsduck/tag_registry'
module JsDuck
  module Format

    # Converts :doc properties of class from markdown to HTML, resolves
    # @links, and converts type definitions to HTML.
    # Performs documentation formatting of a class and all of its
    # members.
    #
    # The actual work is delegated to the #format methods of Tag
    # classes, to which we pass the Format::Doc instance which they
    # can use to perform the formatting.
    #
    # The formatting done by #format methods usually consists of
    # turning :doc properties of class from markdown to HTML,
    # resolving @links, and converting type definitions to HTML.
    class Class
      def initialize(formatter)
        @formatter = formatter