Rdoc - how to exclude internal APIs, and use :title: and :main:?

I’m sorry if I’m missing the obvious, but i’m staring at the docs, and
exerimenting, and it I’m not making progress.

++ Q1

I have

module A
private
module B
end
def A.func
end
end

I don’t want A::B to show up in the API docs at all, its just a
container I use for implementation details. A.func is also internal.

Neither B nor A.func in private in module ‘A’ – you’d have to put the
private in the metaclass to do that.

Your best bet is probably to use :nodoc: on the internal module and the
internal private methods.

What is the syntax for --main? I’ve tried some various things, but they
don’t seem to do what I want!

I have

:title:vcard - a library to manipulate vCard 2.1, vCard 3.0, and RFC

2425 objects

:main:Rfc2425::Vcard

module Rfc2425
class Vcard
end


end

And I want the Vcard class to be the main page.

I’m getting :title: ignored, and “vcard.rb:50:6: Unrecognized directive
‘main’” for main.

Strange - both worked for me when I tried them here. Perhaps you are
not running the latest RDoc? I suggest getting the CVS version from
SourceForge and trying again.

Also, the ‘main’ directive sets the main page to the file that contains
the given symbol, which might not be the effect you’re expecting.

Sorry

Dave

···

On Saturday, Mar 8, 2003, at 19:59 US/Central, Sam Roberts wrote:

Quoteing dave@pragprog.com, on Sun, Mar 09, 2003 at 12:11:22PM +0900:

++ Q1
Your best bet is probably to use :nodoc: on the internal module and the
internal private methods.

Perfect, sorry I missed that in the docs.

Strange - both worked for me when I tried them here. Perhaps you are
not running the latest RDoc? I suggest getting the CVS version from
SourceForge and trying again.

OK, things are much better from CVS. I have a title, and I think :main:
is respected.

But I have a new message now, what does

Found symbol “line”

mean? Attached is the src, in case that helps.

Notice that I have:

Author:: Sam Roberts sroberts@uniserve.com

Copyright:: Copyright (C) 2003 Sam Roberts

License:: May be distributed under the same terms as Ruby

vcard.rb (10.5 KB)

···

On Saturday, Mar 8, 2003, at 19:59 US/Central, Sam Roberts wrote:

An implementation of the MIME Content-Type for Directory

Information (RFC 2425), and profiles of this format.

module Rfc2425

Basically copied from your example, but in the html, those lines all
begin with a ‘#’ character. And the text description starts with two
hashes! Is this intended?

Also, the ‘main’ directive sets the main page to the file that contains
the given symbol, which might not be the effect you’re expecting.

Is it possible that this may have been interacting badly with the
–one-file option?

Btw, I seem to have much more than one file, so I’m not to sure what
–one-file is for. I was hoping to get all the docs in one file… :slight_smile:
though I guess that’s not possible with html frames.

Thanks,
Sam

Quoteing sroberts@uniserve.com, on Mon, Mar 10, 2003 at 03:02:12AM +0900:

Basically copied from your example, but in the html, those lines all
begin with a ‘#’ character. And the text description starts with two
hashes! Is this intended?

I found that his behaviour is triggered by the presence of a :main:
directive. If you remove it from the doc comment in front of module
Rfc2425 then the text is displayed in html without the leading ‘#’ characters.

Sam