<commit_before>module PrimeService
  class Action < Service
    attr_accessor :model


    def self.use_form(form_class, &block)
      attr_accessor :form
      private       :form=

      define_method :set_form do
        self.form =
          if block_given?
            Class.new(form_class, &block).new(model)
          else
            form_class.new(model)
          end
      end

      define_method :errors do
        form.errors
      end
    end


    def initialize(*)
      super

      setup
      set_form
    end


    private

    def setup
    end

    def set_form<commit_msg>Give Action#set_form and Action#errors access to super<commit_after>module PrimeService
  class Action < Service
    attr_accessor :model


    def self.use_form(form_class, &block)
      attr_accessor :form
      private       :form=

      mod = Module.new do
        define_method :set_form do
          self.form =
            if block_given?
              Class.new(form_class, &block).new(model)
            else
              form_class.new(model)
            end
        end

        define_method :errors do
          form.errors
        end
      end

      self.include mod
    end


    def initialize(*)
      super

      setup
      set_form
    end


    private

    def setup
    end

    def set_form
{'fraction_non_alphanumeric': 0.05399239543726236, 'fraction_numerical': 0.0, 'mean_word_length': 1.5454545454545454, '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': '3800011', 'n_tokens_mistral': 396, 'n_tokens_neox': 369, 'n_words': 99}