Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- we_wanna_ride = true
- stops = ["East Bumpspark", "Endertromb Avenue", "New Mixico", "Mal Abochny"]
- while we_wanna_ride
- print "Where ya headin', friend?: "
- destination = gets.chomp
- puts destination.gsub(/\w+/, &:capitalize)
- if stops.include? destination
- puts "I know how to get to #{destination.capitalize!}! Here's the station list:"
- stops.each do |stop|
- puts stop
- break if stop == destination
- we_wanna_ride = false
- end
- else
- puts "Sorry, we don't stop at that station. Maybe another time!"
- we_wanna_ride = false
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement