A Context is something that can hold modules, classes, methods, attributes, aliases, requires, and includes. Classes, modules, and files are all Contexts.
| Classes | |
|---|---|
| Section | |
| Public Attributes | |
|---|---|
| aliases | |
| attributes | |
| constants | |
| in_ |
|
| includes | |
| method_ |
|
| name | |
| requires | |
| sections | |
| visibility | |
| Public Methods | |
|---|---|
| <=> | allow us to sort modules by name |
| add_ |
|
| add_ |
|
| add_ |
|
| add_ |
|
| add_ |
|
| add_ |
|
| add_ |
|
| add_ |
|
| add_ |
Requires always get added to the top-level (file) context |
| add_ |
|
| classes | map the class hash to an array externally |
| defined_ |
Return true if at least part of this thing was defined in file |
| each_ |
|
| each_ |
Iterate over all the classes and modules in this object |
| each_ |
|
| each_ |
|
| find_ |
find a module at a higher scope |
| find_ |
|
| find_ |
Find a named module |
| find_ |
Look up the given symbol. If method is non-nil, then we assume the symbol references a module that contains that method |
| initialize_ |
|
| initialize_ |
|
| modules | map the module hash to an array externally |
| new | |
| ongoing_ |
Change the default visibility for new methods |
| record_ |
Record the file that we happen to find it in |
| remove_ |
and remove classes and modules when we see a :nodoc: all |
| remove_ |
If a class’s documentation is turned off after we’ve started collecting methods etc., we need to remove the ones we have |
| set_ |
Handle sections |
| set_ |
Given an array methods of method names, set the visibility of the corresponding AnyMethod object |
| toplevel | Return the toplevel that owns us |
| Private Methods | |
|---|---|
| find_ |
Find a named attribute, or return nil |
| find_ |
Find a named constant, or return nil |
| find_ |
Find a named instance method, or return nil |
| find_ |
Find a named method, or return nil |
<code/>and<pre/>for code samples.