Created
September 15, 2014 15:59
-
-
Save pumpkincouture/4ebb3f48035b9e07ea1a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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