method
add_includes
v1_9_2_180 -
Show latest stable
- Class:
RDoc::RI::Driver
add_includes(out, includes)public
Adds includes to out
# File lib/rdoc/ri/driver.rb, line 391
def add_includes out, includes
return if includes.empty?
out << RDoc::Markup::Rule.new(1)
out << RDoc::Markup::Heading.new(1, "Includes:")
includes.each do |modules, store|
if modules.length == 1 then
include = modules.first
name = include.name
path = store.friendly_path
out << RDoc::Markup::Paragraph.new("#{name} (from #{path})")
if include.comment then
out << RDoc::Markup::BlankLine.new
out << include.comment
end
else
out << RDoc::Markup::Paragraph.new("(from #{store.friendly_path})")
wout, with = modules.partition { |incl| incl.comment.empty? }
out << RDoc::Markup::BlankLine.new unless with.empty?
with.each do |incl|
out << RDoc::Markup::Paragraph.new(incl.name)
out << RDoc::Markup::BlankLine.new
out << incl.comment
end
unless wout.empty? then
verb = RDoc::Markup::Verbatim.new
wout.each do |incl|
verb.push ' ', incl.name, "\n"
end
out << verb
end
end
end
end Related methods
- Instance methods
- add_also_in
- add_class
- add_from
- add_includes
- add_method_list
- ancestors_of
- class_cache
- classes
- complete
- display
- display_class
- display_method
- display_name
- display_names
- expand_class
- expand_name
- find_methods
- formatter
- interactive
- list_known_classes
- list_methods_matching
- load_method
- load_methods_matching
- method_type
- page
- paging?
- parse_name
- run
- setup_pager
- Class methods
- default_options
- dump
- new
- process_args
- run