class Confire::Processor
This is where the main bits are processed
We can process lines and blocks here
Attributes
custom_processor[RW]
logger[RW]
Public Class Methods
new(options = {})
click to toggle source
# File lib/confire/processor.rb, line 7 def initialize(options = {}) @logger = options[:logger] @custom_processor = options[:custom_processor] @custom_processor.logger = @logger if @custom_processor end
Public Instance Methods
process_block(line_buffer, test_number)
click to toggle source
Will process a test case. Just return whatever we want to print out as results. line_buffer: an array of inputs. each line read is an element in the array test_number: the current test case number we are working on. probably won’t need this value
# File lib/confire/processor.rb, line 17 def process_block(line_buffer, test_number) if (@custom_processor && @custom_processor.class.method_defined?(:process_testcase)) @custom_processor.process_testcase line_buffer else line_buffer end end
process_line(line)
click to toggle source
Process the line
Each of these lines get stored as an element in the line_buffer array
line: the line the process
# File lib/confire/processor.rb, line 28 def process_line(line) if (@custom_processor && @custom_processor.class.method_defined?(:process_line)) @custom_processor.process_line line else line.split ' ' end end