Class: Nydp::StreamReader

Inherits:
Object show all
Defined in:
lib/nydp/runner.rb

Direct Known Subclasses

FileReader

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, stream) ⇒ StreamReader

Returns a new instance of StreamReader.



25
26
27
# File 'lib/nydp/runner.rb', line 25

def initialize name, stream
  @name, @stream = name, stream
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



23
24
25
# File 'lib/nydp/runner.rb', line 23

def name
  @name
end

Instance Method Details

#nextlineObject



29
30
31
# File 'lib/nydp/runner.rb', line 29

def nextline
  @stream.readline unless @stream.eof?
end

#readObject



33
34
35
# File 'lib/nydp/runner.rb', line 33

def read
  ""
end