Class: Nydp::FileReader

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

Instance Attribute Summary collapse

Attributes inherited from StreamReader

#name

Instance Method Summary collapse

Methods inherited from StreamReader

#nextline

Constructor Details

#initialize(name, filename) ⇒ FileReader

Returns a new instance of FileReader.



41
42
43
44
# File 'lib/nydp/runner.rb', line 41

def initialize name, filename
  super name, File.new(filename)
  @filename = filename
end

Instance Attribute Details

#filenameObject

Returns the value of attribute filename.



39
40
41
# File 'lib/nydp/runner.rb', line 39

def filename
  @filename
end

Instance Method Details

#readObject



46
47
48
# File 'lib/nydp/runner.rb', line 46

def read
  File.read filename
end