1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Clean up comments

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2008-01-16 01:36:19 +00:00
parent 84684e00d5
commit c3e2bdcc20

View file

@ -9,9 +9,6 @@ class RDoc::RI::Formatter
@indent = indent
end
######################################################################
def draw_line(label=nil)
len = @width
len -= (label.size+1) if label
@ -23,8 +20,6 @@ class RDoc::RI::Formatter
puts
end
######################################################################
def wrap(txt, prefix=@indent, linelen=@width)
return unless txt && !txt.empty?
work = conv_markup(txt)
@ -46,36 +41,28 @@ class RDoc::RI::Formatter
puts(prefix + res.join("\n" + next_prefix))
end
######################################################################
def blankline
puts
end
######################################################################
# called when we want to ensure a nbew 'wrap' starts on a newline
# Only needed for HtmlFormatter, because the rest do their
# own line breaking
##
# Called when we want to ensure a new 'wrap' starts on a newline. Only
# needed for HtmlFormatter, because the rest do their own line breaking.
def break_to_newline
end
######################################################################
def bold_print(txt)
print txt
end
######################################################################
def raw_print_line(txt)
puts txt
end
######################################################################
##
# Convert HTML entities back to ASCII
# convert HTML entities back to ASCII
def conv_html(txt)
txt.
gsub(/>/, '>').
@ -85,7 +72,9 @@ class RDoc::RI::Formatter
end
# convert markup into display form
##
# Convert markup into display form
def conv_markup(txt)
txt.
gsub(%r{<tt>(.*?)</tt>}) { "+#$1+" } .
@ -94,8 +83,6 @@ class RDoc::RI::Formatter
gsub(%r{<em>(.*?)</em>}) { "_#$1_" }
end
######################################################################
def display_list(list)
case list.type
@ -149,8 +136,6 @@ class RDoc::RI::Formatter
end
end
######################################################################
def display_flow_item(item, prefix=@indent)
case item
when RDoc::Markup::Flow::P, RDoc::Markup::Flow::LI
@ -174,8 +159,6 @@ class RDoc::RI::Formatter
end
end
######################################################################
def display_verbatim_flow_item(item, prefix=@indent)
item.body.split(/\n/).each do |line|
print @indent, conv_html(line), "\n"
@ -183,8 +166,6 @@ class RDoc::RI::Formatter
blankline
end
######################################################################
def display_heading(text, level, indent)
text = strip_attributes(text)
case level
@ -206,7 +187,6 @@ class RDoc::RI::Formatter
end
end
def display_flow(flow)
flow.each do |f|
display_flow_item(f)
@ -228,7 +208,6 @@ class RDoc::RI::Formatter
text.join
end
end
##
@ -323,9 +302,6 @@ class RDoc::RI::AttributeFormatter < RDoc::RI::Formatter
protected
##
# overridden in specific formatters
def write_attribute_text(prefix, line)
print prefix
line.each do |achar|
@ -334,9 +310,6 @@ class RDoc::RI::AttributeFormatter < RDoc::RI::Formatter
puts
end
##
# again, overridden
def bold_print(txt)
print txt
end
@ -384,7 +357,7 @@ class RDoc::RI::OverstrikeFormatter < RDoc::RI::AttributeFormatter
end
##
# draw a string in bold
# Draw a string in bold
def bold_print(text)
text.split(//).each do |ch|
@ -464,10 +437,6 @@ end
class RDoc::RI::HtmlFormatter < RDoc::RI::AttributeFormatter
def initialize(*args)
super
end
def write_attribute_text(prefix, line)
curr_attr = 0
line.each do |achar|
@ -636,7 +605,6 @@ class RDoc::RI::SimpleFormatter < RDoc::RI::Formatter
end
##
# Finally, fill in the list of known formatters