Class: RI::SimpleFormatter
- Inherits:
-
TextFormatter
- Object
- TextFormatter
- RI::SimpleFormatter
- Defined in:
- lib/rdoc/ri/ri_formatter.rb
Overview
This formatter reduces extra lines for a simpler output. It improves way output looks for tools like IRC bots.
Constant Summary
Constants inherited from TextFormatter
Instance Attribute Summary
Attributes inherited from TextFormatter
Instance Method Summary collapse
-
#blankline ⇒ Object
No extra blank lines.
-
#display_heading(text, level, indent) ⇒ Object
Place heading level indicators inline with heading.
-
#draw_line(label = nil) ⇒ Object
Display labels only, no lines.
Methods inherited from TextFormatter
#bold_print, #break_to_newline, #conv_html, #conv_markup, #display_flow, #display_flow_item, #display_list, #display_verbatim_flow_item, for, #initialize, list, #raw_print_line, #strip_attributes, #wrap
Constructor Details
This class inherits a constructor from RI::TextFormatter
Instance Method Details
#blankline ⇒ Object
No extra blank lines
615 616 |
# File 'lib/rdoc/ri/ri_formatter.rb', line 615 def blankline end |
#display_heading(text, level, indent) ⇒ Object
Place heading level indicators inline with heading.
633 634 635 636 637 638 639 640 641 642 643 |
# File 'lib/rdoc/ri/ri_formatter.rb', line 633 def display_heading(text, level, indent) text = strip_attributes(text) case level when 1 puts "= " + text.upcase when 2 puts "-- " + text else print indent, text, "\n" end end |
#draw_line(label = nil) ⇒ Object
Display labels only, no lines
622 623 624 625 626 627 |
# File 'lib/rdoc/ri/ri_formatter.rb', line 622 def draw_line(label=nil) unless label.nil? then bold_print(label) puts end end |