Class Rex::Ui::Text::Table
In: lib/rex/ui/text/table.rb
Parent: Object

Prints text in a tablized format. Pretty lame at the moment, but whatever.

Methods

<<   add_hr   add_row   new   p   print   to_s  

Public Class methods

Initializes a text table instance using the supplied properties. The Table class supports the following hash attributes:

Header

     The string to display as a heading above the table.  If none is
     specified, no header will be displayed.

HeaderIndent

     The amount of space to indent the header.  The default is zero.

Columns

     The array of columns that will exist within the table.

Rows

     The array of rows that will exist.

Width

     The maximum width of the table in characters.

Indent

     The number of characters to indent the table.

CellPad

     The number of characters to put between each horizontal cell.

Prefix

     The text to prefix before the table.

Postfix

     The text to affix to the end of the table.

Public Instance methods

Adds a row using the supplied fields.

Adds a horizontal line.

Adds a row with the supplied fields.

p()

Alias for print

Prints the contents of the table.

Converts table contents to a string.

[Validate]