method
render_class
v2_2_9 -
Show latest stable
- Class:
RDoc::RI::Driver
render_class(out, store, klass, also_in)public
Renders the klass from store to out. If the klass has no documentable items the class is added to also_in instead.
# File lib/rdoc/ri/driver.rb, line 1351
def render_class out, store, klass, also_in # :nodoc:
comment = klass.comment
# TODO the store's cache should always return an empty Array
class_methods = store.class_methods[klass.full_name] || []
instance_methods = store.instance_methods[klass.full_name] || []
attributes = store.attributes[klass.full_name] || []
if comment.empty? and
instance_methods.empty? and class_methods.empty? then
also_in << store
return
end
add_from out, store
class_document_comment out, comment
if class_methods or instance_methods or not klass.constants.empty? then
out << RDoc::Markup::Rule.new(1)
end
class_document_constants out, klass
add_method_list out, class_methods, 'Class methods'
add_method_list out, instance_methods, 'Instance methods'
add_method_list out, attributes, 'Attributes'
add_method_documentation out, klass if @show_all
end Related methods
- Instance methods
- add_also_in
- add_class
- add_extends
- add_extension_modules
- add_extension_modules_multiple
- add_extension_modules_single
- add_from
- add_includes
- add_method
- add_method_documentation
- add_method_list
- ancestors_of
- class_cache
- class_document
- class_document_comment
- class_document_constants
- classes
- classes_and_includes_and_extends_for
- complete
- complete_klass
- complete_method
- display
- display_class
- display_method
- display_name
- display_names
- display_page
- display_page_list
- expand_class
- expand_name
- filter_methods
- find_methods
- find_pager_jruby
- find_store
- formatter
- in_path?
- interactive
- list_known_classes
- list_methods_matching
- load_method
- load_methods_matching
- lookup_method
- method_document
- method_type
- name_regexp
- page
- paging?
- parse_name
- render_class
- render_method
- render_method_arguments
- render_method_comment
- render_method_superclass
- run
- setup_pager
- start_server
- Class methods
- default_options
- dump
- new
- process_args
- run