Sha256: fc81745572c14d738fa69a16d9cf3fc8a8d5804f6e302f0d886e8fba488519fd
Contents?: true
Size: 600 Bytes
Versions: 16
Compression:
Stored size: 600 Bytes
Contents
# frozen_string_literal: true module Spandx module Core class Relation attr_reader :io, :index def initialize(io, index) @io = io @index = index end def each size.times do |n| yield row(n) end end def size index.size end def row(number) offset = number.zero? ? 0 : index.position_for(number) return unless offset io.seek(offset) parse_row(io.gets) end private def parse_row(line) CsvParser.parse(line) end end end end
Version data entries
16 entries across 16 versions & 1 rubygems