Module: Java::OrgMarc4j::MarcReader
- Includes:
- Enumerable
- Defined in:
- lib/marc4j4r.rb
Overview
Re-open the MarcReader interface, define #each and include Enumerable
We also automatically call #hashify on the records that stream through #each in order to speed up RecordImpl#[] when (a) doing many operations on a single record, and (b) we’re not worried about interleaved tags (e.g., a 520 followed by a 510 followed by another 520)
Instance Method Summary
- - (Object) each(hashify = true) Return the next record, after calling #hashify on it.
Instance Method Details
- (Object) each(hashify = true)
Return the next record, after calling #hashify on it
26 27 28 29 30 31 32 |
# File 'lib/marc4j4r.rb', line 26 def each(hashify=true) while self.hasNext r = self.next r.hashify if hashify yield r end end |