Class: Lf::Formatter::LTSV

Inherits:
Lf::Formatter show all
Defined in:
lib/lf/formatter/ltsv.rb

Constant Summary

Constants inherited from Lf::Formatter

FORMATTERS

Class Method Summary collapse

Methods inherited from Lf::Formatter

[], []=

Class Method Details

.format(row) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/lf/formatter/ltsv.rb', line 4

def self.format(row)
  fields = []

  row.each_pair do |label, val|
    fields << "#{green(label.to_s)}:#{cyan(val.to_s)}"
  end

  fields.join("\t")
end