You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: dimension_validator.rb
    path of file: ./repos/active_storage_validations/lib/active_storage_validations
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require_relative 'concerns/errorable.rb'
require_relative 'concerns/symbolizable.rb'
require_relative 'metadata.rb'

module ActiveStorageValidations
  class DimensionValidator < ActiveModel::EachValidator # :nodoc
    include OptionProcUnfolding
    include Errorable
    include Symbolizable

    AVAILABLE_CHE
    
      def validate_each(record, attribute, _value)
        return true unless record.send(attribute).attached?

        changes = record.attachment_changes[attribute.to_s]
        return true if changes.blank?

        files = Array.wrap(changes.is_a?(ActiveStorage::Attached::Changes::CreateMany) ? changes.attachables : changes.attachable)
        files.each do |file|
          metadata = Metadata.new(file).metadata
          next if is_valid?(record, attribute, file, metadata)
          break
        end
      end