<commit_before>require "virtus"

module MultiSync

  # Defines constants and methods related to the Source
  class Source
    include Virtus

    attribute :targets, Array, :default => []
    attribute :include, String, :default => "**/*"
    attribute :exclude, String

    # Initialize a new Source object
    #
    # @param options [Hash]
    def initialize(options = {})
      self.targets << options.delete(:targets) { [] }
      self.targets.flatten!
      self.include ||= options.delete(:include)
      self.exclude = options.delete(:exclude)
    end

  end

end<commit_msg>allow singular or multiple targets<commit_after>require "virtus"

module MultiSync

  # Defines constants and methods related to the Source
  class Source
    include Virtus

    attribute :targets, Array, :default => []
    attribute :include, String, :default => "**/*"
    attribute :exclude, String

    # Initialize a new Source object
    #
    # @param options [Hash]
    def initialize(options = {})
      self.targets.concat([*options.delete(:targets)])
      self.include ||= options.delete(:include)
      self.exclude ||= options.delete(:exclude)
    end

  end

end
{'fraction_non_alphanumeric': 0.1146551724137931, 'fraction_numerical': 0.0, 'mean_word_length': 3.176258992805755, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '2816469', 'n_tokens_mistral': 339, 'n_tokens_neox': 317, 'n_words': 95}