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 615
615:     def blankline
616:     end

Place heading level indicators inline with heading.

[Source]

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

Display labels only, no lines

[Source]

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

[Validate]