Class

RDoc::Context

Inheritance
< RDoc::CodeObject < Object

A Context is something that can hold modules, classes, methods, attributes, aliases, requires, and includes. Classes, modules, and files are all Contexts.

Classes & Modules

Attributes

Name Visibility R/W Description
aliases public R
attributes public R
constants public R
in_files public R
includes public R
method_list public R
name public R
requires public R
sections public R
visibility public R

Methods

Class

Visibility Signature
public new ()

Instance

Visibility Signature
public <=> (other)
public add_alias (an_alias)
public add_attribute (an_attribute)
public add_class (class_type, name, superclass)
public add_class_or_module (collection, class_type, name, superclass=nil)
public add_constant (const)
public add_include (an_include)
public add_method (a_method)
public add_module (class_type, name)
public add_require (a_require)
public add_to (array, thing)
public classes ()
public defined_in? (file)
public each_attribute () {|a| ...}
public each_classmodule () {|m| ...}
public each_constant () {|c| ...}
public each_method () {|m| ...}
public find_enclosing_module_named (name)
public find_local_symbol (symbol)
public find_module_named (name)
public find_symbol (symbol, method=nil)
public initialize_classes_and_modules ()
public initialize_methods_etc ()
public modules ()
public ongoing_visibility= (vis)
public record_location (toplevel)
public remove_classes_and_modules ()
public remove_methods_etc ()
public set_current_section (title, comment)
public set_visibility_for (methods, vis, singleton=false)
public toplevel ()

Class Method Detail

new()

Instance Method Detail

<=>(other)

allow us to sort modules by name

add_alias(an_alias)

add_attribute(an_attribute)

add_class(class_type, name, superclass)

add_class_or_module(collection, class_type, name, superclass=nil)

add_constant(const)

add_include(an_include)

add_method(a_method)

add_module(class_type, name)

add_require(a_require)

Requires always get added to the top-level (file) context

add_to(array, thing)

classes()

map the class hash to an array externally

defined_in?(file)

Return true if at least part of this thing was defined in file

each_attribute() {|a| ...}

each_classmodule() {|m| ...}

Iterate over all the classes and modules in this object

each_constant() {|c| ...}

each_method() {|m| ...}

find_enclosing_module_named(name)

find a module at a higher scope

find_local_symbol(symbol)

find_module_named(name)

Find a named module

find_symbol(symbol, method=nil)

Look up the given symbol. If method is non-nil, then we assume the symbol references a module that contains that method

initialize_classes_and_modules()

initialize_methods_etc()

modules()

map the module hash to an array externally

ongoing_visibility=(vis)

Change the default visibility for new methods

record_location(toplevel)

Record the file that we happen to find it in

remove_classes_and_modules()

and remove classes and modules when we see a :nodoc: all

remove_methods_etc()

If a class‘s documentation is turned off after we‘ve started collecting methods etc., we need to remove the ones we have

set_current_section(title, comment)

Handle sections

set_visibility_for(methods, vis, singleton=false)

Given an array methods of method names, set the visibility of the corresponding AnyMethod object

toplevel()

Return the toplevel that owns us