Class: GrafanaReporter::CsvTableFormatStrategy

Inherits:
AbstractTableFormatStrategy show all
Defined in:
lib/grafana_reporter/csv_table_format_strategy.rb

Overview

Implements a default table format strategy, which will return tables as CSV formatted strings.

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractTableFormatStrategy

#format, get, inherited

Class Method Details

.abbreviationObject



8
9
10
# File 'lib/grafana_reporter/csv_table_format_strategy.rb', line 8

def self.abbreviation
  'csv'
end

Instance Method Details

#format_rulesObject



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/grafana_reporter/csv_table_format_strategy.rb', line 13

def format_rules
  {
    row_start: '',
    row_end: "\n",
    cell_start: '',
    between_cells: ', ',
    cell_end: '',
    replace_string_or_regex: ',',
    replacement: '\\,'
  }
end