<commit_before># encoding: utf-8

require "pathname"

module RySafe
  class Path < Struct.new(:path)
    def to_s
      path
    end

    def to_node
      Safe::Node.create_from_path(path)
    end

    def to_existing_node_in(root = Safe::Tree.current)
      Safe::Node.from_path(path, in: root)
    end

    def absolute?
      raise "Not implemented by Path."
    end

    def relative?
      !absolute?
    end
  end

  class RelativePath < Path
    attr_reader :pwd
<commit_msg>Fix default for #to_existing_node_in<commit_after># encoding: utf-8

require "pathname"

module RySafe
  class Path < Struct.new(:path)
    def to_s
      path
    end

    def to_node
      Safe::Node.create_from_path(path)
    end

    def to_existing_node_in(root = Safe::Tree.root)
      Safe::Node.from_path(path, in: root)
    end

    def absolute?
      raise "Not implemented by Path."
    end

    def relative?
      !absolute?
    end
  end

  class RelativePath < Path
    attr_reader :pwd

{'fraction_non_alphanumeric': 0.0821501014198783, 'fraction_numerical': 0.002028397565922921, 'mean_word_length': 2.5, 'pattern_counts': {'":': 0, '<': 7, '<?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': '1971923', 'n_tokens_mistral': 341, 'n_tokens_neox': 328, 'n_words': 89}