lib/train.rb
#gets all of the cities for a given train (no test for this method)
gets all of the cities for a given train (no test for this method)
gets all of the cities for a given train ( no test for this method )
def cities_for_train()
      returned_cities = DB.exec("SELECT city_name FROM stops WHERE train_name = '#{@name}';")
      cities = []
      returned_cities.each do |city|
        cities.push(city.fetch("city_name"))
      end
      cities
    end
def cities_for_train ( ) returned_cities = DB . exec ( "SELECT city_name FROM stops WHERE train_name = '#{@name}';" ) cities = [ ] returned_cities . each do | city | cities . push ( city . fetch ( "city_name" ) ) end cities end
gets all of the cities for a given train (no test for this method)
gets all of the cities for a given train ( no test for this method )