Class: TextReader
- Inherits:
-
Object
- Object
- TextReader
- Defined in:
- lib/text_reader.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ TextReader
constructor
A new instance of TextReader.
Constructor Details
#initialize ⇒ TextReader
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 |