<commit_before>class FileReader
  attr_reader :lines

  def initialize(filePath)
    @filePath = filePath
  end

  def check_if_file_exists
    if File.exists?(@filePath) then
      if File.directory?(@filePath) then
        print_message "File #{@filePath} is a directory"
        exit
      else
        print_message "Reading file..."
      end
    else
      print_message "File #{@filePath} does not exist"
      exit
    end
  end

  def read_file
    print_message("Reading file #{@filePath}")

    check_if_file_exists
    @lines = read_lines

    print_message("Reading file finished")
  end

  def read_lines
    IO.readlines(@filePath)
  end

  def print_message(message)
    puts message
  end
end<commit_msg>Visual refactoring and makes file reader methods private<commit_after>class FileReader
  attr_reader :lines

  def initialize(filePath)
    @filePath = filePath
  end

  def read_file
    print_message("Reading file #{@filePath}")

    check_if_file_exists
    @lines = read_lines

    print_message("Reading file finished")
  end

  private
  def check_if_file_exists
    if File.exists?(@filePath) then
      if File.directory?(@filePath) then
        print_message "File #{@filePath} is a directory"
        exit
      else
        print_message "Reading file..."
      end
    else
      print_message "File #{@filePath} does not exist"
      exit
    end
  end

  def read_lines
    IO.readlines(@filePath)
  end

  def print_message(message)
    puts message
  end
end
{'fraction_non_alphanumeric': 0.07357859531772576, 'fraction_numerical': 0.0, 'mean_word_length': 2.8066157760814248, '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': '91675', 'n_tokens_mistral': 471, 'n_tokens_neox': 454, 'n_words': 129}