Method: WavefrontDisplayPrinter::Terse#stringify

Defined in:
lib/wavefront-cli/display/printer/terse.rb

#stringify(data, keys) ⇒ Object

Flatten nested data.

Parameters:

  • data (Map, Hash)

    data to flatten

  • keys (Array[Symbol])

    keys of interest. We don’t bother working on things we’ll only throw away



32
33
34
# File 'lib/wavefront-cli/display/printer/terse.rb', line 32

def stringify(data, keys)
  data.map { |e| e.tap { keys.each { |k| e[k] = value_as_string(e[k]) } } }
end