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.
- #allow_items_only? ⇒ Boolean
Methods inherited from Base
#command_class, #command_class_name, #command_file, #filtered_response, #initialize, #items_only, #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.
13 14 15 |
# File 'lib/wavefront-cli/output/yaml.rb', line 13 def _run JSON.parse(resp.to_json).to_yaml end |
#allow_items_only? ⇒ Boolean
17 18 19 |
# File 'lib/wavefront-cli/output/yaml.rb', line 17 def allow_items_only? true end |