class Readfile
Attributes
format[RW]
header[RW]
time[RW]
Public Class Methods
new()
click to toggle source
# File lib/fake_csv/readfile.rb, line 6 def initialize @format = Hash.new end
Public Instance Methods
read(file)
click to toggle source
# File lib/fake_csv/readfile.rb, line 9 def read(file) index = 0 File.foreach(file) do |row| sep = row.split(":") if sep[0] == "header" @header = sep[1].chomp elsif sep[0] =~ /format/i @format.store(index, :format=>sep[0], :content=>sep[1].chomp) index += 1 end end end