todo.rb
def load_from_file(input_file)
  check_file(input_file)
  str_goals = []
  File.open(input_file, "r") do |file|
    file.each_line do |line|
      str_goals.push(line)
    end
  end

  $last_goal_id = str_goals.length
  
  convert_to_goals(str_goals)
end
# Read the contents of the output file and store each
# line into an array of string.
# Then call on convert_to_goals(str_goals) to fill
# goal array: $goals with goal objects containing the
# parsed information from the strings in str_goals
#
Read the contents of the output file and store each
line into an array of string.
Then call on convert_to_goals(str_goals) to fill
goal array: $goals with goal objects containing the
parsed information from the strings in str_goals
Read the contents of the output file and store each line into an array of string . Then call on convert_to_goals ( str_goals ) to fill goal array : $goals with goal objects containing the parsed information from the strings in str_goals
def load_from_file(input_file)
  check_file(input_file)
  str_goals = []
  File.open(input_file, "r") do |file|
    file.each_line do |line|
      str_goals.push(line)
    end
  end
  $last_goal_id = str_goals.length
  convert_to_goals(str_goals)
end
def load_from_file ( input_file ) check_file ( input_file ) str_goals = [ ] File . open ( input_file , "r" ) do | file | file . each_line do | line | str_goals . push ( line ) end end $last_goal_id = str_goals . length convert_to_goals ( str_goals ) end
Read the contents of the output file and store each
line into an array of string.
Read the contents of the output file and store each line into an array of string .
input_file