Rdoc with readable hashes

Hello,

I want to parse a ruby config of a window manager which utilizes hashes.
Is there a way to get a fancier ouput than this?

Template:

== Options

Following options change behaviour and sizes of the window manager:

OPTIONS = {

Border size in pixel of the windows

:border => 2,

Window move/resize steps in pixel per keypress

:step => 5,

Window screen border snapping

:snap => 10,

Default starting gravity for windows

:gravity => :center,

Make transient windows urgent

:urgent => true,

Enable respecting of size hints globally

:resize => false,

Screen size padding (left, right, top, bottom)

:padding => [ 0, 0, 0, 0 ],

Font string (see xfontsel)

:font => “--fixed-----10-------
}

Output:

I want to parse a ruby config of a window manager which utilizes hashes.
Is there a way to get a fancier ouput than this?

OPTIONS = {

Border size in pixel of the windows

:border => 2,

Window move/resize steps in pixel per keypress

:step => 5,

You could duplicate the descriptions in the RDOC comment, or you try and
use an rdoc directive like :method:

http://rdoc.rubyforge.org/RDoc/Parser/Ruby.html

I think I’ve seen some docu that’s like

param:: describe something that could be in args

param2:: again

def go args
end

but I’m not sure what that was for–yard?
-r

On Nov 5, 2009, at 12:10 PM, Roger P. wrote:

-r

Posted via http://www.ruby-forum.com/.

YARD has @option:

class Test
# Nice little method with hash-arg
#
# @option param :height [Fixnum, #to_i] (300) The height
# @option param :width [Fixnum, #to_i] (200) The width
#
def test(param = {})

 end

end

I thing param:: an such was used by the Merb team.

Regards,
Florian