class BigBench::PostProcessor::Processor

A single processor, be it a block or a module is always mapped into this class

Attributes

options[RW]
proc[RW]
runs[RW]

Public Class Methods

new(processor = nil, options = {}, &block) click to toggle source

Creates the processor with the block or a processor

# File lib/bigbench/post_processor.rb, line 70
def initialize(processor = nil, options = {}, &block)
  @proc = processor_to_proc(processor) || block
  @runs, @options = 0, options
end

Public Instance Methods

run!() click to toggle source

Run the block of code or the run! method of the processor

# File lib/bigbench/post_processor.rb, line 76
def run!
  @runs += 1
  Context.module_exec(@options, &@proc)
end