Class: Msf::Ui::Console::Table

Inherits:
Rex::Text::Table
  • Object
show all
Defined in:
lib/msf/ui/console/table.rb

Overview

Console table display wrapper that allows for stylized tables

Defined Under Namespace

Modules: DefaultStyle, Style

Class Method Summary collapse

Class Method Details

.new(*args, &block) ⇒ Object


21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/msf/ui/console/table.rb', line 21

def self.new(*args, &block)
  style, opts = args

  if style == Style::Default
    opts['Indent']  = 3
    if (!opts['Prefix'])
      opts['Prefix']  = "\n"
    end
    if (!opts['Postfix'])
      opts['Postfix'] = "\n"
    end
  end

  instance = super(opts, &block)
  if style == Style::Default
    instance.extend(DefaultStyle)
  end
  instance
end