Class: Validb::Batcher

Inherits:
Object
  • Object
show all
Defined in:
lib/validb/batcher.rb

Instance Method Summary collapse

Constructor Details

#initialize(logger) ⇒ Batcher

Returns a new instance of Batcher.



4
5
6
# File 'lib/validb/batcher.rb', line 4

def initialize(logger)
  @record_validator = RecordValidator.new(logger)
end

Instance Method Details

#validate(record_batch) ⇒ Object



8
9
10
11
12
13
# File 'lib/validb/batcher.rb', line 8

def validate(record_batch)
  $stdout.print "."
  record_batch.each do |record|
    @record_validator.validate(record)
  end
end