Class: WavefrontOutput::Yaml

Inherits:
Base
  • Object
show all
Defined in:
lib/wavefront-cli/output/yaml.rb

Overview

Display as YAML

Instance Attribute Summary

Attributes inherited from Base

#cmd, #options, #resp

Instance Method Summary collapse

Methods inherited from Base

#command_class, #command_class_name, #command_file, #initialize, #my_format, #run

Constructor Details

This class inherits a constructor from WavefrontOutput::Base

Instance Method Details

#_runObject

We don’t want the YAML keys to be symbols, so we load it as JSON and turn that into YAML.



11
12
13
# File 'lib/wavefront-cli/output/yaml.rb', line 11

def _run
  JSON.parse(resp.to_json).to_yaml
end