Class

RI::TextFormatter

Inheritance
< Object

Finally, fill in the list of known formatters

Constants

Name   Description
FORMATTERS = { "ansi" => AnsiFormatter, "bs" => OverstrikeFormatter, "html" => HtmlFormatter, "plain" => TextFormatter, "simple" => SimpleFormatter, }

Attributes

Name Visibility R/W Description
indent public R

Methods

Class

Visibility Signature
public for (name)
public list ()
public new (options, indent)

Instance

Visibility Signature
public blankline ()
public bold_print (txt)
public break_to_newline ()
public conv_html (txt)
public conv_markup (txt)
public display_flow (flow)
public display_flow_item (item, prefix=@indent)
public display_heading (text, level, indent)
public display_list (list)
public display_verbatim_flow_item (item, prefix=@indent)
public draw_line (label=nil)
public raw_print_line (txt)
public strip_attributes (txt)
public wrap (txt, prefix=@indent, linelen=@width)

Class Method Detail

for(name)

list()

new(options, indent)

Instance Method Detail

blankline()

bold_print(txt)

break_to_newline()

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

conv_html(txt)

convert HTML entities back to ASCII

conv_markup(txt)

convert markup into display form

display_flow(flow)

display_flow_item(item, prefix=@indent)

display_heading(text, level, indent)

display_list(list)

display_verbatim_flow_item(item, prefix=@indent)

draw_line(label=nil)

raw_print_line(txt)

strip_attributes(txt)

wrap(txt, prefix=@indent, linelen=@width)