Skip to content

Instantly share code, notes, and snippets.

@pumpkincouture
Created September 15, 2014 15:59
Show Gist options
  • Save pumpkincouture/4ebb3f48035b9e07ea1a to your computer and use it in GitHub Desktop.
Save pumpkincouture/4ebb3f48035b9e07ea1a to your computer and use it in GitHub Desktop.
def get_flights(file)
flights_array = []
csv_data = CSV.foreach(file) do |row|
flight = Flight.new(row)
flights_array << flight unless row.empty?
end
flights_array
end
def delete_whitespace(list)
list.each do |row|
list.delete(row) if row.destination && row.departure== nil
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment