lib/cli.rb
def ask_state
        prompt = TTY::Prompt.new
        pre_response = prompt.select("Which state/territory would you like to view?", %w(AL-Alabama AK-Alaska AZ-Arizona AR-Arkansas CA-California CO-Colorado CT-Conneticut DE-Delaware FL-Florida GA-Georgia HI-Hawaii ID-Idaho IL-Illinois IN-Indiana IA-Iowa KS-Kansas KY-Kentucky LA-Louisiana ME-Maine MD-Maryland MA-Massachusetts MI-Michigan MN-Minnesota MS-Mississippi MO-Missouri MT-Montana NE-Nebraska NV-Nevada NH-NewHampshire NJ-NewJersey NM-NewMexico NY-NewYork NC-NorthCarolina ND-NorthDakota OH-Ohio OK-Oklahoma OR-Oregon PA-Pennsylvania RI-RhodeIsland SC-SouthCarolina SD-SouthDakota TN-Tennessee TX-Texas UT-Utah VT-Vermont VA-Virginia WA-Washington WV-WestVirginia WI-Wisconsin WY-Wyoming DC-WashingtonDC GU-Guam MP-NorthernMarianas PR-PuertoRico VI-VirginIslands))
        response = pre_response[0, 2]
        print_data(response)
    end
#asks user which state they want to see
asks user which state they want to see
asks user which state they want to see
def ask_state
        prompt = TTY::Prompt.new
        pre_response = prompt.select("Which state/territory would you like to view?", %w(AL-Alabama AK-Alaska AZ-Arizona AR-Arkansas CA-California CO-Colorado CT-Conneticut DE-Delaware FL-Florida GA-Georgia HI-Hawaii ID-Idaho IL-Illinois IN-Indiana IA-Iowa KS-Kansas KY-Kentucky LA-Louisiana ME-Maine MD-Maryland MA-Massachusetts MI-Michigan MN-Minnesota MS-Mississippi MO-Missouri MT-Montana NE-Nebraska NV-Nevada NH-NewHampshire NJ-NewJersey NM-NewMexico NY-NewYork NC-NorthCarolina ND-NorthDakota OH-Ohio OK-Oklahoma OR-Oregon PA-Pennsylvania RI-RhodeIsland SC-SouthCarolina SD-SouthDakota TN-Tennessee TX-Texas UT-Utah VT-Vermont VA-Virginia WA-Washington WV-WestVirginia WI-Wisconsin WY-Wyoming DC-WashingtonDC GU-Guam MP-NorthernMarianas PR-PuertoRico VI-VirginIslands))
        response = pre_response[0, 2]
        print_data(response)
    end
def ask_state prompt = TTY :: Prompt . new pre_response = prompt . select ( "Which state/territory would you like to view?" , %w( AL-Alabama AK-Alaska AZ-Arizona AR-Arkansas CA-California CO-Colorado CT-Conneticut DE-Delaware FL-Florida GA-Georgia HI-Hawaii ID-Idaho IL-Illinois IN-Indiana IA-Iowa KS-Kansas KY-Kentucky LA-Louisiana ME-Maine MD-Maryland MA-Massachusetts MI-Michigan MN-Minnesota MS-Mississippi MO-Missouri MT-Montana NE-Nebraska NV-Nevada NH-NewHampshire NJ-NewJersey NM-NewMexico NY-NewYork NC-NorthCarolina ND-NorthDakota OH-Ohio OK-Oklahoma OR-Oregon PA-Pennsylvania RI-RhodeIsland SC-SouthCarolina SD-SouthDakota TN-Tennessee TX-Texas UT-Utah VT-Vermont VA-Virginia WA-Washington WV-WestVirginia WI-Wisconsin WY-Wyoming DC-WashingtonDC GU-Guam MP-NorthernMarianas PR-PuertoRico VI-VirginIslands ) ) response = pre_response [ 0 , 2 ] print_data ( response ) end
asks user which state they want to see
asks user which state they want to see