class LastMatchesSaver
  def self.save_last_in_file(file_name, last_matches)
    file = File.new(file_name, "w")
    last_matches.each do |match|
      match_format = "#{match["home_team_name"]} #{match["home_team_score"]} - #{match["away_team_score"]} #{match["away_team_name"]}" 
      file.puts match_format
    end
    file.close
  end
end
