class

Crab::Rule

Inherits Crab::Renderable / Reference / Object

An Object made to create Rules and possibly headers

Constructors

new(width : Int32 = 80, text : String = "", crab_codes : String = "", text_pos : String = "center")

Create a new Rule object It's parameters are: width: The width of the rule, is possible use Crab.get_cols for this text: The text to be display with the rule, it can have multiple positions crab_codes: A string with the crab codes to apply to the full Rule, default is "", example "#[red]" text_pos: A string to set the text position, it can be right, left or center, defaults to center.

Source

Instance methods

crab_codes
Source
crab_codes=(crab_codes : String)
Source
render

Render the Rule to a String to be Parsed by an Crab::Ansi_Parser, if possible do not call directly

Source
text
Source
text=(text : String)
Source
text_pos
Source
text_pos=(text_pos : String)
Source
width
Source
width=(width : Int32)
Source