Opal::Border
Border glyph definitions for boxes, cards, windows, and tables. Supports standard line styles, character swaps, and repeating multi-character pattern borders (e.g. "-+-+-+", "=~=~=", or custom corners).
Constructors
ascii
Sourcedouble
Sourcenew(top : String, bottom : String, left : String, right : String, top_left : String, top_right : String, bottom_left : String, bottom_right : String)
Sourcenone
Sourcepattern(top : String, bottom : String, left : String, right : String, top_left : String, top_right : String, bottom_left : String, bottom_right : String) : Border
Creates a custom pattern border with fully specified corners
Creates a custom repeating pattern border with distinct horizontal, vertical, and corner symbols
Creates a custom repeating pattern border (e.g. top: "-+", left: "|", corners: "+")
rounded
Sourcesingle
Sourcethick
SourceInstance methods
active?
Sourcebottom
Sourcebottom_left
Sourcebottom_right
SourceGenerates a tiled horizontal string for the bottom edge of specified character length
left
SourceReturns the left border character for a given row offset within the height
right
SourceReturns the right border character for a given row offset within the height
swap(top : String | Nil = nil, bottom : String | Nil = nil, left : String | Nil = nil, right : String | Nil = nil, corners : String | Nil = nil, top_left : String | Nil = nil, top_right : String | Nil = nil, bottom_left : String | Nil = nil, bottom_right : String | Nil = nil) : Border
Returns a new border with selected pieces swapped
top
Sourcetop_left
Sourcetop_right
Source