<commit_before>require_relative 'query'
require 'launchy'

class CmdInterface

  def initialize
    @queries = Query.new
  end

  def basic_for_loop
    loop do
      main_menu
      $stdout.flush
      $stdin.flush
      character = gets.chomp
      case character
        when '1' then list_all_cities
        when '2' then get_city
        when '3' then show_statistics
        when '4' then show_url
        else break
      end
    end
  end

  private

  def list_all_cities
    puts "\nAll cities CSAir flies to:\n\n"
    @queries.list_all_cities
    print "\n"
  end<commit_msg>Added directions for CLI<commit_after>require_relative 'query'
require 'launchy'

# Class created for the command line UI. The main module that runs it is in lib/csair.rb
class CmdInterface

  def initialize
    @queries = Query.new
  end

  def basic_for_loop
    loop do
      main_menu
      $stdout.flush
      $stdin.flush
      character = gets.chomp
      case character
        when '1' then list_all_cities
        when '2' then get_city
        when '3' then show_statistics
        when '4' then show_url
        else break
      end
    end
  end

  private

  def list_all_cities
    puts "\nAll cities CSAir flies to:\n\n"
    @queries.list_all_cities
    print "\n"
  end
{'fraction_non_alphanumeric': 0.05817610062893082, 'fraction_numerical': 0.006289308176100629, 'mean_word_length': 2.230964467005076, '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': '3481281', 'n_tokens_mistral': 421, 'n_tokens_neox': 411, 'n_words': 130}