Day 36: Splitting Time Between Writing a New App and Learning Ruby the Hard Way

So, I want to get back to finishing Learn Ruby the Hard Way while also applying my new found knowledge to the app I am creating.

I will start with Exercise 39:

and the results:

demosthenes131@rails-tutorial:~/workspace/LRTHW (master) $ ruby ex39.rb
NY state has: New York
OR state has Portland
Michigan’s abbreviation is: MI.
Florida’s abbreviation is: FL
Michigan has: Detroit
Florida has: Jacksonville
Oregon is abbreviated OR
Florida is abbreviated FL
California is abbreviated CA
New York is abbreviated NY
Michigan is abbreviated MI
Oregon has the city OR
Florida has the city FL
California has the city CA
New York has the city NY
Michigan has the city MI
Oregon is abbreviated OR and has city Portland
Florida is abbreviated FL and has city Jacksonville
California is abbreviated CA and has city San Francisco
New York is abbreviated NY and has city New York
Michigan is abbreviated MI and has city Detroit
Sorry, no Texas.
The city for the state ‘TX’ is: Does Not Exist

OK, I have more to do this lesson but spent the rest of my night reading through my code and trying to figure out how to get my user input to go into a hash then have that hash go into an array. I will continue tomorrow.