Class: Tapout::PerlParser

Inherits:
Object
  • Object
show all
Defined in:
lib/tapout/parsers/perl.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 = {}) ⇒ PerlParser

options - the report format to use



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

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



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

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