defunkt / tomdoc

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

The parser does not allow for omission of the return section for a constructor #31

Open Sleft opened 11 years ago

Sleft commented 11 years ago

I am using TomDoc v0.2.5. The specification says

A Ruby class's initialize method does not have a significant return value. You MAY exclude the returns section.

However if you try to feed the following to the parser

class Class1
  # Public: Constructs a...
  def initialize
    @var = 1
  end
end

it returns nothing. But the following

class Class1
  # Public: Constructs a...
  #
  # Returns...
  def initialize
    @var = 1
  end
end

returns

--------------------------------------------------------------------------------
Class1#initialize

Public: Constructs a...

Returns...
trans commented 11 years ago

Rather then fixing this particular parse issue, tomdoc needs to be converted to use the tomparse gem. I've been planing to do so, but haven't had the time.