Class: Spandx::Os::Parsers::Dpkg::LineReader

Inherits:
Object
  • Object
show all
Defined in:
lib/spandx/os/parsers/dpkg.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(io) ⇒ LineReader

Returns a new instance of LineReader.



10
11
12
# File 'lib/spandx/os/parsers/dpkg.rb', line 10

def initialize(io)
  @io = io
end

Instance Attribute Details

#ioObject (readonly)

Returns the value of attribute io.



8
9
10
# File 'lib/spandx/os/parsers/dpkg.rb', line 8

def io
  @io
end

Instance Method Details

#eachObject



14
15
16
# File 'lib/spandx/os/parsers/dpkg.rb', line 14

def each
  yield read_package(io, Hash.new(''), nil) until io.eof?
end