Class

Context

Extends:

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_files
includes
method_list
name
requires
sections
visibility
Public Methods
<=> allow us to sort modules by name
add_alias
add_attribute
add_class
add_class_or_module
add_constant
add_include
add_method
add_module
add_require Requires always get added to the top-level (file) context
add_to
classes map the class hash to an array externally
defined_in? Return true if at least part of this thing was defined in file
each_attribute
each_classmodule Iterate over all the classes and modules in this object
each_constant
each_method
find_enclosing_module_named find a module at a higher scope
find_local_symbol
find_module_named Find a named module
find_symbol 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
new
ongoing_visibility= Change the default visibility for new methods
record_location 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 Handle sections
set_visibility_for 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_attribute_named Find a named attribute, or return nil
find_constant_named Find a named constant, or return nil
find_instance_method_named Find a named instance method, or return nil
find_method_named Find a named method, or return nil
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.