<commit_before>require 'mv/core/validation/builder/factory'

module Mv
  module Core
    module Constraint
      module Builder
        class Base
          attr_reader :constraint

          delegate :name, to: :constraint

          def initialize(constraint)
            @constraint = constraint
          end

          def create
          end

          def delete
          end

          def update new_constraint_builder
          end

          def self.validation_builders_factory
            @validation_builders_factory ||= Mv::Core::Validation::Builder::Factory.new
          end

          protected

          def validation_builders
            @validation_builders ||= constraint.validations.collect do |validation|
              self.class.validation_builders_factory.create_builder(validation)
            end
          end

          def db
            ::ActiveRecord::Base.connection
          end
        end
      end
    end
  end
end<commit_msg>migration validators are made public<commit_after>require 'mv/core/validation/builder/factory'

module Mv
  module Core
    module Constraint
      module Builder
        class Base
          attr_reader :constraint

          delegate :name, to: :constraint

          def initialize(constraint)
            @constraint = constraint
          end

          def create
          end

          def delete
          end

          def update new_constraint_builder
          end

          def self.validation_builders_factory
            @validation_builders_factory ||= Mv::Core::Validation::Builder::Factory.new
          end
          
          def validation_builders
            @validation_builders ||= constraint.validations.collect do |validation|
              self.class.validation_builders_factory.create_builder(validation)
            end
          end

          protected


          def db
            ::ActiveRecord::Base.connection
          end
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.05060728744939271, 'fraction_numerical': 0.0, 'mean_word_length': 1.6501340482573728, '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': '7542902', 'n_tokens_mistral': 471, 'n_tokens_neox': 452, 'n_words': 117}