Class: Mutant::Reporter::CLI::Format::Framed

Inherits:
Mutant::Reporter::CLI::Format show all
Defined in:
lib/mutant/reporter/cli/format.rb

Overview

Format for framed rewindable output

Constant Summary collapse

BUFFER_FLAGS =
'a+'.freeze
OUTPUT_RATE =

Rate per second progress report fires

1.0 / 20

Instance Method Summary collapse

Methods inherited from Mutant::Reporter::CLI::Format

#report

Constructor Details

#initializeundefined

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.

Initialize object



133
134
135
136
# File 'lib/mutant/reporter/cli/format.rb', line 133

def initialize(*)
  super
  @last_frame = nil
end

Instance Method Details

#progress(collector) ⇒ String

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.

Format progress

Parameters:

Returns:

  • (String)


158
159
160
161
162
# File 'lib/mutant/reporter/cli/format.rb', line 158

def progress(collector)
  throttle do
    format(Printer::Collector, collector)
  end.to_s
end

#start(_env) ⇒ String

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.

Format start

Parameters:

Returns:

  • (String)


146
147
148
# File 'lib/mutant/reporter/cli/format.rb', line 146

def start(_env)
  tput.prepare
end