Class: PBatcher::Processor

Inherits:
ProcHandler show all
Defined in:
lib/pbatcher/processor.rb

Instance Attribute Summary

Attributes inherited from ProcHandler

#method

Attributes inherited from Handler

#generator

Instance Method Summary collapse

Methods inherited from ProcHandler

#call, #initialize

Methods inherited from Handler

#initialize

Constructor Details

This class inherits a constructor from PBatcher::ProcHandler

Instance Method Details

#process(item) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/pbatcher/processor.rb', line 3

def process(item)
  pre(item)
  result = call(item)
  raise "Item #{item} is not a valid item." unless generator.validator.valid?(result)
  success(item)
  result
rescue => e
  failure(item, e)
end