defunkt / tomdoc

A TomDoc Ruby library.
http://tomdoc.org/
MIT License
114 stars 16 forks source link

Class documentation missing in HTML output #15

Closed justincase closed 12 years ago

justincase commented 13 years ago

Using a simple example from the spec:


# Public: Various methods useful for performing mathematical operations.
# All methods are module methods and should be called on the Math module.
#
# Examples
#
#   Math.square_root(9)
#   # => 3
class Math
  # Public: Duplicate some text an arbitrary number of times.
  #
  # text  - The String to be duplicated.
  # count - The Integer number of times to duplicate the text.
  #
  # Examples
  #
  #   multiplex('x', 4)
  #   # => 'xxxx'
  #
  #   multiplex('apple', 2)
  #   # => 'appleapple'
  #
  # Returns the duplicated String.
  def multiplex(text, count)
    text * count
  end
end

Produces the following console output (note the missing examples from the multiplex method):


--------------------------------------------------------------------------------
Math

Public: Various methods useful for performing mathematical operations.
All methods are module methods and should be called on the Math module.

Examples

  Math.square_root(9)
  # => 3
--------------------------------------------------------------------------------
Math#multiplex(text, count)

Public: Duplicate some text an arbitrary number of times.

text  - The String to be duplicated.
count - The Integer number of times to duplicate the text.

Examples

Returns the duplicated String.

With HTML as the format the examples are there but the class description is omitted?


<ul>
<li><b>Math#multiplex(text, count)</b><pre>Public: Duplicate some text an arbitrary number of times.

text  - The String to be duplicated.
count - The Integer number of times to duplicate the text.

Examples

  multiplex('x', 4)
  # => 'xxxx'

  multiplex('apple', 2)
  # => 'appleapple'

Returns the duplicated String.</pre></li></ul>
dasch commented 12 years ago

I've fixed this in #17.