<commit_before>require "dry-auto_inject"

module Dry
  module Component
    class Injector < BasicObject
      # @api private
      attr_reader :container

      # @api private
      attr_reader :options

      # @api private
      attr_reader :injector

      # @api private
      def initialize(container, options: {}, strategy: :default)
        @container = container
        @options = options
        @injector = ::Dry::AutoInject(container, options).send(strategy)
      end

      # @api public
      def [](*deps)
        load_components(*deps)
        injector[*deps]
      end

      def method_missing(name, *args, &block)
        ::Dry::Component::Injector.new(container, options: options, strategy: name)
      end

      def respond_to?(name, include_private = false)
        injector.respond_to?(name, include_private)
      end

      private

      def load_components(*components)
        components = components.dup
        aliases = components.last.is_a?(::Hash) ? components.pop : {}<commit_msg>Use public_send instead of send<commit_after>require "dry-auto_inject"

module Dry
  module Component
    class Injector < BasicObject
      # @api private
      attr_reader :container

      # @api private
      attr_reader :options

      # @api private
      attr_reader :injector

      # @api private
      def initialize(container, options: {}, strategy: :default)
        @container = container
        @options = options
        @injector = ::Dry::AutoInject(container, options).public_send(strategy)
      end

      # @api public
      def [](*deps)
        load_components(*deps)
        injector[*deps]
      end

      def method_missing(name, *args, &block)
        ::Dry::Component::Injector.new(container, options: options, strategy: name)
      end

      def respond_to?(name, include_private = false)
        injector.respond_to?(name, include_private)
      end

      private

      def load_components(*components)
        components = components.dup
        aliases = components.last.is_a?(::Hash) ? components.pop : {}
{'fraction_non_alphanumeric': 0.10004856726566294, 'fraction_numerical': 0.0, 'mean_word_length': 2.5701906412478337, 'pattern_counts': {'":': 0, '<': 5, '<?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': '7531473', 'n_tokens_mistral': 589, 'n_tokens_neox': 580, 'n_words': 140}