Class

RI::AttributeFormatter

Inheritance
< RI::TextFormatter < Object

Handle text with attributes. We‘re a base class: there are different presentation classes (one, for example, uses overstrikes to handle bold and underlining, while another using ANSI escape sequences

Classes & Modules

Constants

Name   Description
ATTR_MAP = { "b" => BOLD, "code" => CODE, "em" => ITALIC, "i" => ITALIC, "tt" => CODE
BOLD = 1
CODE = 4
ITALIC = 2

Methods

Instance

Visibility Signature
public wrap (txt, prefix=@indent, linelen=@width)
protected bold_print (txt)
protected write_attribute_text (prefix, line)

Instance Method Detail

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

overrides base class. Looks for etc sequences and generates an array of AttrChars. This array is then used as the basis for the split

bold_print(txt)

again, overridden

write_attribute_text(prefix, line)

overridden in specific formatters