RDoc and blocks in class definitions

P

Paul van Tilburg

Hi.

I use an ExceptionFactory to create some custom exceptions. These
Exceptions are defined in a class and I wanted to document them.
However.. rdoc seems to have considerable trouble with them.

It's rather hard to explain what goes wrong with the HTML generation, so
I'll insert a small example file here:
---
# Some nice test class
class Foo

# Some exception used in this class:
# A foo exception
FooException = ExceptionFactory.new("foo")
# A bar exception
BarException = ExceptionFactory.new("bar") do
a = 0
end

# Create a new foo!
def initialize
end

end # Foo
---

When 'a = 0' is commented out, thus creating an emtpy block, or the block
is removed there is no problem and Foo#initialize gets documented.
If not.. strange things happen. :)

It seems :call-seq: or something alike is available for constants. Is
there an alternative for documenting these Exception classes?
Is there a workaround for this problem or maybe.. a fix?


Greetings, TIA,

Paul
[/QUOTE]
 

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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top