Class: TextReader

Inherits:
Object
  • Object
show all
Defined in:
lib/text_reader.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTextReader

Returns a new instance of TextReader.



2
3
# File 'lib/text_reader.rb', line 2

def initialize
end

Class Method Details

.open_file(file_name) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/text_reader.rb', line 6

def self.open_file(file_name)

  File.open(file_name, "r") do |f|
  f.each_line do |line|
    return line.to_f
    end
  end
end