Sha256: 19db53447fa29e1f1bf4ea4bf9efc4b47cf24e5ad3696c143fa740895f59bc9b

Contents?: true

Size: 1 KB

Versions: 2

Compression:

Stored size: 1 KB

Contents

require "vagrant"

module VagrantPlugins
  module Registration
    class Config < Vagrant.plugin("2", :config)
      # The username to subscribe with
      #
      # @return [String]
      attr_accessor :subscriber_username

      # The password of the subscriber
      #
      # @return [String]
      attr_accessor :subscriber_password

      # Skip the registration (skip if true)
      #
      # @return [Bool]
      attr_accessor :skip

      # Force the registration (skip if true)
      #
      # @return [Bool]
      attr_accessor :force

      def initialize(region_specific=false)
        @subscriber_username = UNSET_VALUE
        @subscriber_password = UNSET_VALUE
        @skip = UNSET_VALUE
        @force = true
      end

      def finalize!
        @subscriber_username = nil if @subscriber_username == UNSET_VALUE
        @subscriber_password = nil if @subscriber_password == UNSET_VALUE
        @skip = false if @skip == UNSET_VALUE
        @force = true if @force == UNSET_VALUE
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vagrant-registration-0.0.8 lib/vagrant-registration/config.rb
vagrant-registration-0.0.7 lib/vagrant-registration/config.rb