class

CRDoc::Render::Context

Inherits Reference < Object

Constructors

new(color : Bool, width : Int32 = 80)
Source

Instance methods

color?
Source
width
Source
write(io : IO, text : String, style : Style = Style::Plain) : Nil

Writes text in style, or bare when color is off.

Source
write_matching(io : IO, text : String, pattern : Regex | Nil, style : Style = Style::Plain) : Nil

Writes text with every non-empty match of pattern in the Match style and the rest in style. Without color it writes text as is.

Source