Class RI::SimpleFormatter
In: ri/ri_formatter.rb
Parent: TextFormatter

This formatter reduces extra lines for a simpler output. It improves way output looks for tools like IRC bots.

Methods

Public Instance methods

No extra blank lines

[Source]

     # File ri/ri_formatter.rb, line 617
617:     def blankline
618:     end

Place heading level indicators inline with heading.

[Source]

     # File ri/ri_formatter.rb, line 635
635:     def display_heading(text, level, indent)
636:       text = strip_attributes(text)
637:       case level
638:       when 1
639:         puts "= " + text.upcase
640:       when 2
641:         puts "-- " + text
642:       else
643:         print indent, text, "\n"
644:       end
645:     end

Display labels only, no lines

[Source]

     # File ri/ri_formatter.rb, line 624
624:     def draw_line(label=nil)
625:       unless label.nil? then
626:         bold_print(label) 
627:         puts
628:       end
629:     end

[Validate]