Problem getting rdoc documenting all top level module/classes in afile

Discussion in 'Ruby' started by Markus Fischer, May 28, 2011.

  1. Hi,

    I'm struggling to understand how rdoc expects my source to be organized
    so it documents everything in it I want.

    Using ruby 1.9.2p180 and rdoc 3.6.1 and the following source layouts
    I've missing documentations:

    ------------------8<-----------------------------
    $ cat test2.rb
    require 'something'
    =begin rdoc
    findmeindoc
    =end
    module Foo
    class Bar
    end
    end
    $ rm -Rf doc && rdoc -v test2.rb
    Parsing sources...
    100% [ 1/ 1] test2.rb
    class Bar (undocumented)


    Generating Darkfish format into ...
    ------------------8<-----------------------------

    In this case, as soon as I put any kind of code above the rdoc of my
    module, the module itself does not get processed anymore. However I
    really prefer having includes and maybe necessary initializations at the
    top. Because when I move it *below* the rdoc but *before* the module
    definition, it works:

    ------------------8<-----------------------------
    $ cat test3.rb
    =begin rdoc
    findmeindoc
    =end
    require 'something'
    module Foo
    class Bar
    end
    end
    $ rm -Rf doc && rdoc -v test3.rb
    Parsing sources...
    100% [ 1/ 1] test3.rb
    class Foo::Bar (undocumented)
    module Foo (undocumented)


    Generating Darkfish format into ...
    ------------------8<-----------------------------

    Similar when I've two modules in a file, only the first one gets processed:

    ------------------8<-----------------------------
    $ cat test8.rb
    =begin rdoc
    findmeindoc
    =end
    module Foo
    end

    =begin rdoc
    findme2indoc
    =end
    module Frob
    end
    $ rm -Rf doc && rdoc -v test8.rb
    Parsing sources...
    100% [ 1/ 1] test8.rb
    module Foo


    Generating Darkfish format into ...
    ------------------8<-----------------------------

    Can this be worked around? Basically I'd like it to document everything
    have, except things I flag with nodoc.

    thanks,
    - Markus
    Markus Fischer, May 28, 2011
    #1
    1. Advertising

  2. Re: Problem getting rdoc documenting all top level module/classes ina file

    Hi,

    On 28.05.2011 10:39, Markus Fischer wrote:
    > I'm struggling to understand how rdoc expects my source to be organized
    > so it documents everything in it I want.


    After some more tests and I short IRC session it looked to me as that
    it's a bug and I've opened an issue [1], HTH.

    - Markus

    [1] https://github.com/rdoc/rdoc/issues/41
    Markus Fischer, May 31, 2011
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. kelvSYC
    Replies:
    2
    Views:
    581
    Chris Smith
    Aug 18, 2004
  2. Chuck Amadi
    Replies:
    0
    Views:
    510
    Chuck Amadi
    Jun 22, 2004
  3. Replies:
    1
    Views:
    311
    Diez B. Roggisch
    Oct 29, 2006
  4. Daniel Berger
    Replies:
    1
    Views:
    138
    Dave Thomas
    Nov 2, 2004
  5. Kenneth McDonald

    Newbie question on RDoc--top-level functions

    Kenneth McDonald, Nov 4, 2008, in forum: Ruby
    Replies:
    2
    Views:
    81
    Ryan Davis
    Nov 4, 2008
Loading...

Share This Page