Class: WavefrontCsvOutput::Base
- Inherits:
-
Object
- Object
- WavefrontCsvOutput::Base
- Defined in:
- lib/wavefront-cli/output/csv/base.rb
Overview
Standard output template
Direct Known Subclasses
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#resp ⇒ Object
readonly
Returns the value of attribute resp.
Instance Method Summary collapse
- #check_query_response ⇒ Object
-
#initialize(resp, options) ⇒ Base
constructor
A new instance of Base.
- #run ⇒ Object
Constructor Details
#initialize(resp, options) ⇒ Base
Returns a new instance of Base.
12 13 14 15 16 |
# File 'lib/wavefront-cli/output/csv/base.rb', line 12 def initialize(resp, ) @resp = resp @options = post_initialize if respond_to?(:post_initialize) end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
10 11 12 |
# File 'lib/wavefront-cli/output/csv/base.rb', line 10 def @options end |
#resp ⇒ Object (readonly)
Returns the value of attribute resp.
10 11 12 |
# File 'lib/wavefront-cli/output/csv/base.rb', line 10 def resp @resp end |
Instance Method Details
#check_query_response ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/wavefront-cli/output/csv/base.rb', line 22 def check_query_response return true unless resp[:timeseries].nil? puts 'No points match query.' exit 0 rescue StandardError raise WavefrontCli::Exception::UnparseableResponse end |
#run ⇒ Object
18 19 20 |
# File 'lib/wavefront-cli/output/csv/base.rb', line 18 def run puts _run end |