Documenting DSLs

I

Intransition

Has anyone done any work on documenting Ruby DSLs? Eg. RDoc can
document this:

# This plugin ...
class MyThing < Plugin
# This does ...
def some
...
end
end

But if one were to make a DSL out of it, say:

# This plugin ...
plugin 'MyThing' do
# This does ...
define 'some' do
...
end
end

Then no RDocy.
 
R

Ryan Davis

Has anyone done any work on documenting Ruby DSLs? Eg. RDoc can
document this:

# This plugin ...
class MyThing < Plugin
# This does ...
def some
...
end
end

But if one were to make a DSL out of it, say:

# This plugin ...
plugin 'MyThing' do
# This does ...
define 'some' do
...
end
end

Then no RDocy.

Seems you're not in "transition" anymore.

2.1.0 / 2008-07-20
=95 3 Major Enhancements:
=95 RDoc now knows about meta-programmed methods, =
seeRDoc::parser::Ruby

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

Florian Gilcher

YARD can be pretty easily made to parse such stuff.

But extending the generated HTML is kind of unintuitive, IMHO.

If you want narrative documentation, Inochi is a gem that tries
to fix this problem.

Regards,
Florian


Has anyone done any work on documenting Ruby DSLs? Eg. RDoc can
document this:

# This plugin ...
class MyThing < Plugin
# This does ...
def some
...
end
end

But if one were to make a DSL out of it, say:

# This plugin ...
plugin 'MyThing' do
# This does ...
define 'some' do
...
end
end

Then no RDocy.

--
Florian Gilcher

smtp: (e-mail address removed)
jabber: (e-mail address removed)
gpg: 533148E2
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,813
Messages
2,569,699
Members
45,489
Latest member
SwethaJ

Latest Threads

Top