Method: Rex::Ui::Text::Table#to_s

Defined in:
lib/rex/ui/text/table.rb

#to_sObject

Converts table contents to a string.



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# File 'lib/rex/ui/text/table.rb', line 104

def to_s
  str  = prefix.dup
  str << header_to_s || ''
  str << columns_to_s || ''
  str << hr_to_s || ''

  sort_rows
  rows.each { |row|
    if (is_hr(row))
      str << hr_to_s
    else
      str << row_to_s(row)
    end
  }

  str << postfix

  return str
end