<commit_before>class FootballNow::CLI

  def call
    welcome_screen

    case get_user_input
    when "exit"
      goodbye_message
    when "list leagues"
      list_leagues
    end

  end

  def welcome_screen
    puts "Welcome to Football Now"
    puts "You can:"
    puts " - type `list leagues` to list all leagues."
    puts " - type `exit` to quit now."
  end

  def list_leagues
    puts "\n\n"
    puts "Available Leagues:"
    puts "=================="
    FootballNow::League.all.each.with_index(1) {|league, index| puts "#{index}. #{league}"}
    puts ""
    puts "You can:"
    puts " - type `<#> recent results` for scores"
    puts " - type `<#> get standings` for the league table"
    puts " - type `<#> list teams` to explore a team indepth"
    puts " - type `exit` to quit now."
    puts ""
    puts "Usage: typing `2 list teams` will list all teams in Primera Division."
    puts ""
    puts "What would you like to do?"
  end

  def goodbye_message
    puts "Until next time!"
    exit 0
  end

  def get_user_input
    gets.strip
  end
end<commit_msg>small refactor cli<commit_after>class FootballNow::CLI

  def call
    welcome_screen

    case get_user_input
    when "exit"
      goodbye_message
    when "list leagues"
      list_leagues
    end

  end

  def list_leagues
    puts "\n\n"
    puts "Available Leagues:"
    puts "=================="
    FootballNow::League.all.each.with_index(1) {|league, index| puts "#{index}. #{league}"}
    puts ""
    puts "You can:"
    puts " - type `<#> recent results` for scores"
    puts " - type `<#> get standings` for the league table"
    puts " - type `<#> list teams` to explore a team indepth"
    puts " - type `exit` to quit now."
    puts ""
    puts "Usage: typing `2 list teams` will list all teams in Primera Division."
    puts ""
    puts "What would you like to do?"
  end

  def welcome_screen
    puts "Welcome to Football Now"
    puts "You can:"
    puts " - type `list leagues` to list all leagues."
    puts " - type `exit` to quit now."
  end
  
  def goodbye_message
    puts "Until next time!"
    exit 0
  end

  def get_user_input
    gets.strip
  end
end
{'fraction_non_alphanumeric': 0.11693735498839908, 'fraction_numerical': 0.0027842227378190253, 'mean_word_length': 2.5286415711947625, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '3244967', 'n_tokens_mistral': 716, 'n_tokens_neox': 720, 'n_words': 251}