<commit_before>require "./config/environment"

class CLI

  # Loads all the NSW National Parks, puts out welcome message and starts the app
  def call
    NSWParks.new_park
    puts ""
    puts ""
    puts " >------------------------------------------------<"
    puts "{ Welcome to the Unofficial NSW National Parks App }"
    puts " >------------------------------------------------<"
    start   
  end

  # Puts out a list of all NSW National Parks
  def park_list
    NSWParks.all.each.with_index(1) {|a,i| puts "#{i}. #{a.name}"}
  end 

  # Puts out information on a selected NSW National Park
  def park_info
    park_list
    park_no = 0
    puts ""
    puts "Enter the number for the park you are interested in:"
    park_no = gets.strip.to_i
    puts ""
    puts NSWParks.all[park_no - 1].name
    puts ""
    puts "----------------------------------------------------------------------------------------"
    NSWParks.park_overview(park_no)
  end

  # Puts out a list of the NSW Regions that contain National Parks
  def park_area
    puts ""
    NSWParks.nsw_areas
  end

  # Puts out a list of National Parks in a selected NSW Region
  def park_region
    region_no = 0<commit_msg>Validated user input for #park_info in cli<commit_after>require "./config/environment"

class CLI

  # Loads all the NSW National Parks, puts out welcome message and starts the app
  def call
    NSWParks.new_park
    puts ""
    puts ""
    puts " >------------------------------------------------<"
    puts "{ Welcome to the Unofficial NSW National Parks App }"
    puts " >------------------------------------------------<"
    start   
  end

  # Puts out a list of all NSW National Parks
  def park_list
    NSWParks.all.each.with_index(1) {|a,i| puts "#{i}. #{a.name}"}
  end 

  # Puts out information on a selected NSW National Park
  def park_info
    park_list
    park_no = 0
    puts ""
    puts "Enter the number for the park you are interested in:"
    park_no = gets.strip.to_i
    while !(park_no.is_a? Integer) || park_no < 1 || park_no > NSWParks.all.length
      park_list
      puts ""
      puts "Please enter a park number from the above list:"
      park_no = gets.strip.to_i
    end  
    puts ""
    puts NSWParks.all[park_no - 1].name
    puts ""
    puts "----------------------------------------------------------------------------------------"
    NSWParks.park_overview(park_no)
  end

  # Puts out a list of the NSW Regions that contain National Parks
  def park_area
    puts ""
    NSWParks.nsw_areas
  end

  # Puts out a list of National Parks in a selected NSW Region
  def park_region
    region_no = 0
{'fraction_non_alphanumeric': 0.20721062618595826, 'fraction_numerical': 0.003415559772296015, 'mean_word_length': 1.6254980079681276, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '5948421', 'n_tokens_mistral': 802, 'n_tokens_neox': 778, 'n_words': 271}