Class: SNMPTableViewer::Formatter::CSV

Inherits:
SNMPTableViewer::Formatter show all
Defined in:
lib/snmp_table_viewer/formatter/csv.rb

Overview

Formatting class for CSV output.

Instance Method Summary collapse

Methods inherited from SNMPTableViewer::Formatter

#initialize

Constructor Details

This class inherits a constructor from SNMPTableViewer::Formatter

Instance Method Details

#outputString

Output the data (and headings if provided).

Returns:

  • (String)

    the CSV data



7
8
9
# File 'lib/snmp_table_viewer/formatter/csv.rb', line 7

def output()
  data_with_headings.map(&:to_csv).join
end