<commit_before>require 'chef_fs/path_utils'

module ChefFS
  module FileSystem
    class BaseFSObject
      def initialize(name, parent)
        @parent = parent
        if parent
          @name = name
          @path = ChefFS::PathUtils::join(parent.path, name)
        else
          @path = '/'
        end
      end

      attr_reader :name
      attr_reader :parent
      attr_reader :path

      def root<commit_msg>Check assumption that name = '' for root<commit_after>require 'chef_fs/path_utils'

module ChefFS
  module FileSystem
    class BaseFSObject
      def initialize(name, parent)
        @parent = parent
        if parent
          @name = name
          @path = ChefFS::PathUtils::join(parent.path, name)
        else
          if name != ''
            raise ArgumentError, "Name of root object must be empty string: was '#{name}' instead"
          end
          @path = '/'
        end
      end

      attr_reader :name
      attr_reader :parent
      attr_reader :path

      def root
{'fraction_non_alphanumeric': 0.07722772277227723, 'fraction_numerical': 0.0, 'mean_word_length': 1.8885714285714286, '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': '6259006', 'n_tokens_mistral': 288, 'n_tokens_neox': 279, 'n_words': 84}