lib/cli.rb
#display instance attributes based on user state choice
display instance attributes based on user state choice
display instance attributes based on user state choice
def list_data(state)
        find = Covidtracker::Coviddata.find_by_state_name(state)
        puts "------------------------------"
        puts "State: #{Covidtracker::Metadata.find_by_state_name(state).name}"
        puts "Date: #{find.date}"
        puts "Positive cases: #{find.positive}"
        puts "Negative cases: #{find.negative}"
        puts "Positive Case Increase: #{find.positiveIncrease}"
        puts "Hospitalized: #{find.hospitalized}"
        puts "Recovered: #{find.recovered}"
        puts "Deaths: #{find.death}"
        puts "------------------------------"
        ask_meta(state) 
        ask_another
    end
def list_data ( state ) find = Covidtracker :: Coviddata . find_by_state_name ( state ) puts "------------------------------" puts "State: #{Covidtracker::Metadata.find_by_state_name(state).name}" puts "Date: #{find.date}" puts "Positive cases: #{find.positive}" puts "Negative cases: #{find.negative}" puts "Positive Case Increase: #{find.positiveIncrease}" puts "Hospitalized: #{find.hospitalized}" puts "Recovered: #{find.recovered}" puts "Deaths: #{find.death}" puts "------------------------------" ask_meta ( state ) ask_another end
display instance attributes based on user state choice
display instance attributes based on user state choice
#Ask if user would like to see metadata #pass in state to #ask_meta to hold onto instance #Ask to choose another state
state