Class: Tapout::PerlParser

Inherits:
AbstractParser show all
Defined in:
lib/tapout/parsers/perl.rb

Overview

This legacy parser takes a traditional TAP stream and routes it through a Tapout report format.

Constant Summary

Constants inherited from AbstractParser

AbstractParser::PAUSE_DOCUMENT, AbstractParser::RESUME_DOCUMENT

Instance Method Summary collapse

Methods inherited from AbstractParser

#passthru

Constructor Details

#initialize(options = {}) ⇒ PerlParser

options - the report format to use



13
14
15
16
# File 'lib/tapout/parsers/perl.rb', line 13

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

Instance Method Details

#consume(input) ⇒ Object

input - any object that responds to #gets



19
20
21
22
23
# File 'lib/tapout/parsers/perl.rb', line 19

def consume(input)
  parser = PerlAdapter.new(input)
  parser | @reporter
  return @reporter.exit_code
end