<commit_before>require 'log4r'

module VagrantPlugins
  module Kernel_V2
    # Represents a single configured provisioner for a VM.
    class VagrantConfigProvisioner < Vagrant.plugin("2", :config)
      # Defaults
      VALID_BEFORE_AFTER_TYPES = [:each, :all].freeze

      # Unique name for this provisioner
      #
      # @return [String]
      attr_reader :name

      # Internal unique name for this provisioner
      # Set to the given :name if exists, otherwise
      # it's set as a UUID.
      #
      # Note: This is for internal use only.
      #
      # @return [String]
      attr_reader :id

      # The type of the provisioner that should be registered
      # as a plugin.
      #
      # @return [Symbol]
      attr_reader :type

      # The configuration associated with the provisioner, if there is any.
      #
      # @return [Object]
      attr_accessor :config

      # When to run this provisioner. Either "once", "always", or "never"
      #
      # @return [String]
      attr_accessor :run

      # Whether or not to preserve the order when merging this with a
      # parent scope.
      #
      # @return [Boolean]
      attr_accessor :preserve_order

      # The name of a provisioner to run before it has started
      #
      # @return [String]
      attr_accessor :before

      # The name of a provisioner to run after it is finished
      #
      # @return [String]
      attr_accessor :after

      def initialize(name, type, before=nil, after=nil)
        @logger = Log4r::Logger.new("vagrant::config::vm::provisioner")
        @logger.debug("Provisioner defined: #{name}")

        @id = name || SecureRandom.uuid
        @config  = nil
        @invalid = false
        @name    = name
        @preserve_order = false
        @run     = nil
        @type    = type
        @before  = before #these aren't being properly set
        @after   = after

        # Attempt to find the provisioner...
        if !Vagrant.plugin("2").manager.provisioners[type]
          @logger.warn("Provisioner '#{type}' not found.")
          @invalid = true
        end
<commit_msg>Update rubydoc for before/after return types<commit_after>require 'log4r'

module VagrantPlugins
  module Kernel_V2
    # Represents a single configured provisioner for a VM.
    class VagrantConfigProvisioner < Vagrant.plugin("2", :config)
      # Defaults
      VALID_BEFORE_AFTER_TYPES = [:each, :all].freeze

      # Unique name for this provisioner
      #
      # @return [String]
      attr_reader :name

      # Internal unique name for this provisioner
      # Set to the given :name if exists, otherwise
      # it's set as a UUID.
      #
      # Note: This is for internal use only.
      #
      # @return [String]
      attr_reader :id

      # The type of the provisioner that should be registered
      # as a plugin.
      #
      # @return [Symbol]
      attr_reader :type

      # The configuration associated with the provisioner, if there is any.
      #
      # @return [Object]
      attr_accessor :config

      # When to run this provisioner. Either "once", "always", or "never"
      #
      # @return [String]
      attr_accessor :run

      # Whether or not to preserve the order when merging this with a
      # parent scope.
      #
      # @return [Boolean]
      attr_accessor :preserve_order

      # The name of a provisioner to run before it has started
      #
      # @return [String, Symbol]
      attr_accessor :before

      # The name of a provisioner to run after it is finished
      #
      # @return [String, Symbol]
      attr_accessor :after

      def initialize(name, type, before=nil, after=nil)
        @logger = Log4r::Logger.new("vagrant::config::vm::provisioner")
        @logger.debug("Provisioner defined: #{name}")

        @id = name || SecureRandom.uuid
        @config  = nil
        @invalid = false
        @name    = name
        @preserve_order = false
        @run     = nil
        @type    = type
        @before  = before #these aren't being properly set
        @after   = after

        # Attempt to find the provisioner...
        if !Vagrant.plugin("2").manager.provisioners[type]
          @logger.warn("Provisioner '#{type}' not found.")
          @invalid = true
        end

{'fraction_non_alphanumeric': 0.08864331060427934, 'fraction_numerical': 0.0023512814483893723, 'mean_word_length': 2.0983248361252733, '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': '3005870', 'n_tokens_mistral': 1252, 'n_tokens_neox': 1212, 'n_words': 409}