Class: WavefrontOutput::Yaml
- Defined in:
- lib/wavefront-cli/output/yaml.rb
Overview
Display as YAML
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#_run ⇒ Object
We don’t want the YAML keys to be symbols, so we load it as JSON and turn that into YAML.
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
#_run ⇒ Object
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 |