hi,
i'm trying to read a few text values from single file:
if File.exists?(file)
File.open(file, 'r+') do |f|
value1 = f.gets.strip
value2 = f.gets.strip
value3 = f.gets.strip
value4 = f.gets.strip
end
end
each value is stored in separate line and 'strip' above is used only to
get rid of end-of-line characters. is there any easier way to do the same?
thanks,
jm.