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: auditor.rb
    path of file: ./repos/arachni/lib/arachni/check
    
    the code of the file until where you have to start completion: =begin
    Copyright 2010-2022 Ecsypno <http://www.ecsypno.com>

    This file is part of the Arachni Framework project and is subject to
    redistribution and commercial restrictions. Please see the Arachni Framework
    web site for more information on licensing and terms of use.
=end

module Arachni
module Check

# Included by {Check::Base} and pro
    
    def skip?( element )
        # This method also gets called from Auditable#audit to check mutations,
        # don't touch these, we're filtering at a higher level here, otherwise
        # we might mess up the audit.
        return true if !element.mutation? && audited?( element.coverage_id )
        return true if !page.audit_element?( element )

        # Don't audit elements which have been already logged as vulnerable
        # either by us or preferred checks.
        (preferred | [shortname]).each do |check|
            next if !framework.checks.include?( check )

            klass = framework.checks[check]
            next if !klass.info.include?(:issue)

            # No point in doing the following heavy deduplication check if there
            # are no issues logged to begin with.
            next if klass.issue_counter == 0

            if Data.issues.include?( klass.create_issue( vector: element ) )
                return true
            end
        end

        false
    end

    # Passes each element prepared for audit to the block.
    #
    # It will use the elements from the check's {Base.info} hash.
    # If no elements have been specified it will use {ELEMENTS_WITH_INPUTS}.
    #
    # @yield       [element]
    #   Each candidate element.
    # @yieldparam [Arachni::Element]
    def each_candidate_element( &block )
        types = self.class.elements
        types = ELEMENTS_WITH_INPUTS if types.empty?

        types.each do |elem|
            elem = elem.type

            next if !Options.audit.elements?( elem )

            case elem
                when Element::Link.type
                    prepare_each_element( page.links, &block )

                when Element::Form.type
                    prepare_each_element( page.forms, &block )

                when Element::Cookie.type
                    prepare_each_element(page.cookies, &block )

                when Element::NestedCookie.type
                    prepare_each_element(page.nested_cookies, &block )

                when Element::Header.type
                    prepare_each_element( page.headers, &block )

                when Element::LinkTemplate.type
                    prepare_each_element( page.link_templates, &block )

                when Element::JSON.type
                    prepare_each_element( page.jsons, &block )

                when Element::XML.type
                    prepare_each_element( page.xmls, &block )

                else
                    fail ArgumentError, "Unknown element: #{elem}"
            end
        end
    end