Class: RDocF95::RI::SimpleFormatter

Inherits:
Formatter
  • Object
show all
Defined in:
lib/rdoc-f95/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 Formatter

Formatter::FORMATTERS

Instance Attribute Summary

Attributes inherited from Formatter

#indent, #output

Instance Method Summary collapse

Methods inherited from Formatter

#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 RDocF95::RI::Formatter

Instance Method Details

#blanklineObject

No extra blank lines


569
570
# File 'lib/rdoc-f95/ri/formatter.rb', line 569

def blankline
end

#display_heading(text, level, indent) ⇒ Object

Place heading level indicators inline with heading.


585
586
587
588
589
590
591
592
593
594
595
# File 'lib/rdoc-f95/ri/formatter.rb', line 585

def display_heading(text, level, indent)
  text = strip_attributes(text)
  case level
  when 1
    @output.puts "= " + text.upcase
  when 2
    @output.puts "-- " + text
  else
    @output.print indent, text, "\n"
  end
end

#draw_line(label = nil) ⇒ Object

Display labels only, no lines


575
576
577
578
579
580
# File 'lib/rdoc-f95/ri/formatter.rb', line 575

def draw_line(label=nil)
  unless label.nil? then
    bold_print(label)
    @output.puts
  end
end