Class: WavefrontDisplay::Write
- Defined in:
- lib/wavefront-cli/display/write.rb
Overview
Format human-readable output when writing points.
Constant Summary
Constants included from WavefrontCli::Constants
WavefrontCli::Constants::DEFAULT_OPTS, WavefrontCli::Constants::HUMAN_TIME_FORMAT, WavefrontCli::Constants::HUMAN_TIME_FORMAT_MS
Instance Attribute Summary
Attributes inherited from Base
#data, #hide_blank, #indent, #indent_step, #indent_str, #kw, #options
Instance Method Summary collapse
Methods inherited from Base
#_two_columns, #do_delete, #do_import, #do_list, #do_list_brief, #do_tag_add, #do_tag_clear, #do_tag_delete, #do_tag_set, #do_tags, #do_undelete, #drop_fields, #friendly_name, #human_time, #indent_wrap, #initialize, #key_width, #long_output, #multicolumn, #print_array, #print_line, #readable_time, #run, #run_error, #set_indent, #terse_output
Constructor Details
This class inherits a constructor from WavefrontDisplay::Base
Instance Method Details
#do_file ⇒ Object
15 16 17 |
# File 'lib/wavefront-cli/display/write.rb', line 15 def do_file do_point end |
#do_point ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/wavefront-cli/display/write.rb', line 7 def do_point [:sent, :rejected, :unsent].each do |k| puts format(' %12s %d', k.to_s, data[k]) end exit(data.rejected.zero? && data.unsent.zero? ? 0 : 1) end |