Class: WavefrontDisplay::Distribution
- Defined in:
- lib/wavefront-cli/display/distribution.rb
Overview
Format human-readable output when writing distributions
Constant Summary
Constants included from WavefrontCli::Constants
WavefrontCli::Constants::ALL_PAGE_SIZE, WavefrontCli::Constants::DEFAULT_CONFIG, WavefrontCli::Constants::DEFAULT_OPTS, WavefrontCli::Constants::HUMAN_TIME_FORMAT, WavefrontCli::Constants::HUMAN_TIME_FORMAT_MS
Instance Attribute Summary
Attributes inherited from Write
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Write
#do_file, #do_point, #nothing_to_say?, #report
Methods inherited from Base
#_prioritize_keys, #do_delete, #do_import, #do_list, #do_list_brief, #do_list_fields, #do_queries, #do_search, #do_search_brief, #do_tag_add, #do_tag_clear, #do_tag_delete, #do_tag_set, #do_tags, #do_undelete, #drop_fields, #filter_data, #filter_fields_as_arr, #friendly_name, #human_time, #initialize, #key_width, #long_output, #multicolumn, #pagination_line, #prioritize_keys, #priority_keys, #readable_time, #readable_time_arr, #run, #run_error, #run_list, #run_search, #time_formats
Constructor Details
This class inherits a constructor from WavefrontDisplay::Base
Instance Method Details
#do_distribution ⇒ Object
7 8 9 10 |
# File 'lib/wavefront-cli/display/distribution.rb', line 7 def do_distribution print_report unless [:quiet] exit(data.rejected.zero? && data.unsent.zero? ? 0 : 1) end |
#print_report ⇒ Object
12 13 14 |
# File 'lib/wavefront-cli/display/distribution.rb', line 12 def print_report report unless (data[:unsent] + data[:rejected]).positive? end |