Class: Mutant::Reporter::CLI::Format Private

Inherits:
Object
  • Object
show all
Includes:
Unparser::AbstractType
Defined in:
lib/mutant/reporter/cli/format.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

CLI output format

rubocop:disable Style/FormatString

Direct Known Subclasses

Progressive

Defined Under Namespace

Classes: Output, Progressive

Constant Summary collapse

DEFAULT_TERMINAL_WIDTH =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

80

Instance Method Summary collapse

Instance Method Details

#delayFloat

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Report delay in seconds



47
48
49
# File 'lib/mutant/reporter/cli/format.rb', line 47

def delay
  self.class::REPORT_DELAY
end

#progressString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Progress representation



37
# File 'lib/mutant/reporter/cli/format.rb', line 37

abstract_method :progress

#startString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Start representation



32
# File 'lib/mutant/reporter/cli/format.rb', line 32

abstract_method :start

#terminal_widthInteger

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Dynamic terminal width - queries current size on each call



19
20
21
22
23
24
25
# File 'lib/mutant/reporter/cli/format.rb', line 19

def terminal_width
  return DEFAULT_TERMINAL_WIDTH unless tty && output_io.respond_to?(:winsize)

  output_io.winsize.last
rescue Errno::ENOTTY, Errno::EOPNOTSUPP
  DEFAULT_TERMINAL_WIDTH
end

#test_progressString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Progress representation



42
# File 'lib/mutant/reporter/cli/format.rb', line 42

abstract_method :test_progress