<commit_before>class LocalLibrary::CLI
  def call
    puts ""
    puts "-------------------- Welcome to the Local library finder --------------------"
    # puts ""
    puts "Please enter a zip code to find the nearest library or 'exit' to exit program."
    puts ""
    start
  end

  def start
    zip_code = nil
    while zip_code != 'exit'
      zip_code = gets.strip
      choice(zip_code)
    end
  end

  def choice(zip_code)

  end

  def list(zip_code)
    LocalLibrary::Library.clear
    puts ""
    puts "...Public libraries near #{zip_code}..."<commit_msg>added CLI#choice method to direct helper methods<commit_after>class LocalLibrary::CLI
  def call
    puts ""
    puts "-------------------- Welcome to the Local library finder --------------------"
    # puts ""
    puts "Please enter a zip code to find the nearest library or 'exit' to exit program."
    puts ""
    start
  end

  def start
    zip_code = nil
    while zip_code != 'exit'
      zip_code = gets.strip
      choice(zip_code)
    end
  end

  def choice(zip_code)
    if zip_code.length == 5 && ZIPS.include?(zip_code)
      list(zip_code)
      puts ""
      puts "Please enter the branch number you would like more information on or 'exit' to exit program."
    elsif zip_code.length == 1 && zip_code.to_i.between?(1, LocalLibrary::Library.libraries.length)
      details(zip_code)
      puts ""
      puts "Please enter another branch nummber, zip code or 'exit' to exit program."
    elsif zip_code == 'exit'
      puts ""
      puts "Thank you for using the Local Library Finder.  Keep on learning."
    else
      puts "That is not a valid entry, please try again, or type 'exit' to exit program."
    end
  end

  def list(zip_code)
    LocalLibrary::Library.clear
    puts ""
    puts "...Public libraries near #{zip_code}..."
{'fraction_non_alphanumeric': 0.13036303630363036, 'fraction_numerical': 0.0016501650165016502, 'mean_word_length': 2.236654804270463, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1040131', 'n_tokens_mistral': 531, 'n_tokens_neox': 537, 'n_words': 194}