class Packetman::Table

Public Class Methods

new() click to toggle source
# File lib/packetman/table.rb, line 7
def initialize

  @term_table = Terminal::Table.new(headings: headings, rows: rows, style: style)
end

Public Instance Methods

headings() click to toggle source
# File lib/packetman/table.rb, line 12
def headings
  [*0..31].map{ |c| "%02d" % c }
end
rows() click to toggle source
# File lib/packetman/table.rb, line 16
def rows
  protocols[config.transport]['table']
end
style() click to toggle source
# File lib/packetman/table.rb, line 20
def style
  { alignment: :center, padding_left: 0, padding_right: 0}
end
to_s() click to toggle source
# File lib/packetman/table.rb, line 24
def to_s
  @term_table.to_s
end