lib/ext/marc/reader.rb
def each_with_offset_caching(yield_raw: false)
      unless block_given?
        return self.enum_for(:each_with_offset_caching)
      else
        @handle.rewind
        i = 0
        self.each_raw do |raw|
          offsets << @handle.pos if offsets.length < i + 2
          i += 1
          if yield_raw
            yield raw
          else
            yield decode(raw)
          end
        end
      end
    end
# Iterates through records and caches byte offset locations of each
# record.
# With yield_raw: true yields raw byte strings (like each_raw)
# rather than MARC::Record objects.
Iterates through records and caches byte offset locations of each
record.
With yield_raw: true yields raw byte strings (like each_raw)
rather than MARC::Record objects.
Iterates through records and caches byte offset locations of each record . With yield_raw : true yields raw byte strings ( like each_raw ) rather than MARC :: Record objects .
def each_with_offset_caching(yield_raw: false)
      unless block_given?
        return self.enum_for(:each_with_offset_caching)
      else
        @handle.rewind
        i = 0
        self.each_raw do |raw|
          offsets << @handle.pos if offsets.length < i + 2
          i += 1
          if yield_raw
            yield raw
          else
            yield decode(raw)
          end
        end
      end
    end
def each_with_offset_caching ( yield_raw : false ) unless block_given? return self . enum_for ( :each_with_offset_caching ) else @handle . rewind i = 0 self . each_raw do | raw | offsets << @handle . pos if offsets . length < i + 2 i += 1 if yield_raw yield raw else yield decode ( raw ) end end end end
Iterates through records and caches byte offset locations of each
record.
Iterates through records and caches byte offset locations of each record .
yield_raw