lib/cli.rb
# Asks user for category selection.
Asks user for category selection.
Asks user for category selection .
def ask_list
    puts "Please enter the number of the category you want:"
    input = gets.strip.to_i
    size = Wordwise::Scraper.scrape_word_lists.size
    if input.between?(1, size)
      @words_defs_ary = Wordwise::Scraper.scrape_word_list(input - 1)
      check_remaining
    else
      ask_list
    end
  end
def ask_list puts "Please enter the number of the category you want:" input = gets . strip . to_i size = Wordwise :: Scraper . scrape_word_lists . size if input . between? ( 1 , size ) @words_defs_ary = Wordwise :: Scraper . scrape_word_list ( input - 1 ) check_remaining else ask_list end end
Asks user for category selection.
Asks user for category selection .
# 