Class: Pal::Operation::TableExporterImpl

Inherits:
BaseExportHandler show all
Defined in:
lib/pal/operation/exporter.rb

Instance Attribute Summary

Attributes inherited from BaseExportHandler

#settings

Instance Method Summary collapse

Methods inherited from BaseExportHandler

#initialize, #run_export

Methods included from Log

#log_debug, #log_error, #log_info, #log_warn

Methods included from Configuration

#config, #register_config

Constructor Details

This class inherits a constructor from Pal::Operation::BaseExportHandler

Instance Method Details

#_export(rows, column_headers) ⇒ Object

Parameters:

  • rows (Array)
  • column_headers (Hash)


173
174
175
176
177
178
179
# File 'lib/pal/operation/exporter.rb', line 173

def _export(rows, column_headers)
  title = @settings["title"] || "<No Title Set>"
  style = @settings["style"] || {}

  table = Terminal::Table.new(title: title, headings: column_headers.keys, rows: rows, style: style)
  puts table
end