Hello,
I am writing a class and I require it to open a file, and store the
contents in key, value pairs.
This is my first
def initialize()
@@store = Hash.new
end
def read_file
if File.exists?("LocationCopy.csv")
f = File.open("LocationCopy.csv","r")
f.each do |line|
temp = line.split(",")
@@store[temp[0]] = temp[1]
end
f.close
end
#puts @@store
end