RDoc::CodeObject

We contain the common stuff for contexts (which are containers) and other
elements (methods, attributes and so on)

Attributes

comment[R]

Access the code object’s comment

document_children[R]

do we document ourselves and our children

document_self[R]

do we document ourselves?

done_documenting[RW]

are we done documenting (ie, did we come across a :enddoc:)?

force_documentation[RW]

Do we force documentation, even is we wouldn’t normally show the
entity

parent[RW]

section[RW]

Which section are we in

viewer[RW]

We are the model of the code, but we know that at some point we will be
worked on by viewers. By implementing the Viewable protocol, viewers can
associated themselves with these objects.

Public Class Methods

attr_overridable(name, *aliases)click to toggle source

There’s a wee trick we pull. Comment blocks can have directives that
override the stuff we extract during the parse. So, we have a special class
method, ::attr_overridable,
that lets code objects list those directives. Wehn a comment is assigned,
we then extract out any matching directives and update our object