Method: MARC::LibXMLReader#each

Defined in:
lib/marc/xml_parsers.rb

#eachObject



347
348
349
350
351
352
353
354
355
356
357
# File 'lib/marc/xml_parsers.rb', line 347

def each
  if block_given?
    while @parser.read
      if @parser.local_name == "record" && @parser.namespace_uri == @ns
        yield build_record
      end
    end # while
  else
    enum_for(:each)
  end
end