<commit_before>module Librarian
  class Dsl
    class Target

      SCOPABLES = [:sources]

      attr_reader :dependency_name, :dependency_type
      attr_reader :source_types, :source_types_map, :source_type_names
      attr_reader :dependencies

      def initialize(dependency_name, dependency_type, source_types)
        @dependency_name = dependency_name
        @dependency_type = dependency_type
        @source_types = source_types
        @source_types_map = Hash[source_types]
        @source_type_names = source_types.map{|t| t[0]}
        @dependencies = []
        SCOPABLES.each do |scopable|
          instance_variable_set(:"@#{scopable}", [])
        end
      end

      def dependency(name, *args)
        options = args.last.is_a?(Hash) ? args.pop : {}
        source = source_from_options(options) || @sources.last
        dep = dependency_type.new(name, args, source)
        @dependencies << dep
      end
<commit_msg>The dsl target scopables should be public methods.<commit_after>module Librarian
  class Dsl
    class Target

      SCOPABLES = [:sources]

      attr_reader :dependency_name, :dependency_type
      attr_reader :source_types, :source_types_map, :source_type_names
      attr_reader :dependencies, *SCOPABLES

      def initialize(dependency_name, dependency_type, source_types)
        @dependency_name = dependency_name
        @dependency_type = dependency_type
        @source_types = source_types
        @source_types_map = Hash[source_types]
        @source_type_names = source_types.map{|t| t[0]}
        @dependencies = []
        SCOPABLES.each do |scopable|
          instance_variable_set(:"@#{scopable}", [])
        end
      end

      def dependency(name, *args)
        options = args.last.is_a?(Hash) ? args.pop : {}
        source = source_from_options(options) || @sources.last
        dep = dependency_type.new(name, args, source)
        @dependencies << dep
      end

{'fraction_non_alphanumeric': 0.09363683393688567, 'fraction_numerical': 0.0010346611484738748, 'mean_word_length': 2.899193548387097, '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': '2331968', 'n_tokens_mistral': 598, 'n_tokens_neox': 570, 'n_words': 118}