<commit_before>Dir.glob(File.join(File.dirname(__FILE__), "**", "*.rb")).each do |f|
  require f
end

module Quinc

  class Quinc
    attr_accessor :source
    attr_accessor :file_processors
    attr_accessor :destinations

    def initialize(path = nil)
      self.file_processors = []
      self.destinations = []
      self.source = Sources::Basic.new(path) if path
    end

    def sync
      files = source.files

      file_processors.each { |fp| files = fp.process(files) }

      destinations.each { |d| d.send(source.path, partial_file_paths(files)) }

      files
    end

    protected<commit_msg>split out file processing in quinc main class<commit_after>Dir.glob(File.join(File.dirname(__FILE__), "**", "*.rb")).each do |f|
  require f
end

module Quinc

  class Quinc
    attr_accessor :source
    attr_accessor :file_processors
    attr_accessor :destinations

    def initialize(path = nil)
      self.file_processors = []
      self.destinations = []
      self.source = Sources::Basic.new(path) if path
    end

    def files
      if @files.nil?
        @files = source.files
        file_processors.each { |fp| @files = fp.process(@files) }
      end
      @files
    end

    def sync
      destinations.each { |d| d.send(source.path, partial_file_paths(files)) }
      files
    end

    protected
{'fraction_non_alphanumeric': 0.10993176648976498, 'fraction_numerical': 0.0, 'mean_word_length': 2.7288135593220337, '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': '6146271', 'n_tokens_mistral': 435, 'n_tokens_neox': 420, 'n_words': 97}