Class: TapOut::TAPLegacyParser

Inherits:
Object
  • Object
show all
Defined in:
lib/tapout/tap_legacy_parser.rb

Overview

The TAPLegacy Parser takes a traditional TAP stream and routes it through a Tap Out report format.

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ TAPLegacyParser

options - the report format to use



12
13
14
15
# File 'lib/tapout/tap_legacy_parser.rb', line 12

def initialize(options={})
  format    = options[:format] || 'dotprogress'
  @reporter = Reporters.factory(format).new
end

Instance Method Details

#consume(input) ⇒ Object

input - any object that responds to #gets



18
19
20
21
# File 'lib/tapout/tap_legacy_parser.rb', line 18

def consume(input)
  parser = TAPLegacyAdapter.new(input)
  parser | @reporter
end