Class: TXTFormatter

Inherits:
ArrayFormatter show all
Defined in:
lib/teuton/report/formatter/default/txt.rb

Direct Known Subclasses

ColoredTextFormatter

Instance Attribute Summary

Attributes inherited from BaseFormatter

#ext

Instance Method Summary collapse

Methods inherited from ArrayFormatter

#build_data

Methods inherited from BaseFormatter

#deinit, #init, #trim, #w

Constructor Details

#initialize(report, color = false) ⇒ TXTFormatter

Returns a new instance of TXTFormatter.



6
7
8
9
10
11
# File 'lib/teuton/report/formatter/default/txt.rb', line 6

def initialize(report, color = false)
  @color = color
  super(report)
  @ext = "txt"
  @data = {}
end

Instance Method Details

#process(options = {}) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/teuton/report/formatter/default/txt.rb', line 13

def process(options = {})
  rainbow_state = Rainbow.enabled
  Rainbow.enabled = @color

  build_data(options)
  process_config
  process_logs
  process_groups
  process_results
  process_hof
  deinit

  Rainbow.enabled = rainbow_state
end