Class: RETS4R::Loader

Inherits:
Object
  • Object
show all
Defined in:
lib/rets4r/loader.rb

Overview

Loader is a convenience class to get lightning-fast RETS XML Document parsing without a lot of typing. Just hand ::load an IO to read the XML from and a block to handle each record. You'll get the work done really fast without thrashing your memory like conventional DOM parsers like to do.

Class Method Summary collapse

Class Method Details

.load(io, &block) ⇒ Object


9
10
11
12
# File 'lib/rets4r/loader.rb', line 9

def self.load(io, &block)
  parser = RETS4R::Client::CompactNokogiriParser.new(io)
  parser.each(&block)
end