class Bosh::Cli::TaskTracking::SmartWhitespacePrinter

Constants

SPACE_BETWEEN_LAST_SEP_AND_SEP
VALID_SEPARATORS

Public Class Methods

new() click to toggle source
# File lib/cli/task_tracking/smart_whitespace_printer.rb, line 29
def initialize
  @buffer = StringIO.new
  @last_sep = :start
end

Public Instance Methods

finish() click to toggle source
# File lib/cli/task_tracking/smart_whitespace_printer.rb, line 50
def finish
  if VALID_SEPARATORS.include?(@last_sep)
    @buffer.print("\n")
  end
end
output() click to toggle source
# File lib/cli/task_tracking/smart_whitespace_printer.rb, line 46
def output
  @buffer.string.tap { @buffer.string = '' }
end
print(separator, msg) click to toggle source