method
display_class_method_list
ruby latest stable - Class:
RDoc::RI::DefaultDisplay
Method deprecated or moved
This method is deprecated or moved on the latest stable version. The last existing version (v1_9_1_378) is shown here.
display_class_method_list(klass)private
Display methods on klass Returns a hash mapping method name to method contents (HACK?)
# File lib/rdoc/ri/display.rb, line 181
def display_class_method_list(klass)
method_map = {}
class_data = [
:class_methods,
:class_method_extensions,
:instance_methods,
:instance_method_extensions,
]
class_data.each do |data_type|
data = klass.send data_type
unless data.nil? or data.empty? then
@formatter.blankline
heading = data_type.to_s.split('_').join(' ').capitalize << ':'
@formatter.display_heading heading, 2, ''
method_names = []
data.each do |item|
method_names << item.name
if(data_type == :class_methods ||
data_type == :class_method_extensions) then
method_map["::#{item.name}"] = :class
method_map[item.name] = :class
else
#
# Since we iterate over instance methods after class methods,
# an instance method always will overwrite the unqualified
# class method entry for a class method of the same name.
#
method_map["##{item.name}"] = :instance
method_map[item.name] = :instance
end
end
method_names.sort!
@formatter.wrap method_names.join(', ')
end
end
method_map
end Related methods
- Instance methods
- display_class_info
- display_flow
- display_method_info
- display_method_list
- display_method_list_choice
- display_params
- get_class_method_choice
- list_known_classes
- page
- setup_pager
- warn_no_database
- Class methods
- new
- Private methods
-
display_class_method_list