Sha256: 458c44d35b7256f63f570cf8a4176e2d50927b1668533312934bc22d3430cad6

Contents?: true

Size: 675 Bytes

Versions: 13

Compression:

Stored size: 675 Bytes

Contents

require "vagrant"

module VagrantPlugins
  module ManagedServers
    class Config < Vagrant.plugin("2", :config)
      
      # The IP address or hostname of the managed server.
      #
      # @return [String]
      attr_accessor :server

      def initialize()
        @server      = UNSET_VALUE
      end

      def finalize!
        # server must be nil, since we can't default that
        @server = nil if @server == UNSET_VALUE
      end

      def validate(machine)
        errors = _detected_errors
        errors << I18n.t("vagrant_managed_servers.config.server_required") if @server.nil?
        { "ManagedServers Provider" => errors }
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
vagrant-managed-servers-0.8.0 lib/vagrant-managed-servers/config.rb
vagrant-managed-servers-0.7.1 lib/vagrant-managed-servers/config.rb
vagrant-managed-servers-0.7.0 lib/vagrant-managed-servers/config.rb
vagrant-managed-servers-0.6.2 lib/vagrant-managed-servers/config.rb
vagrant-managed-servers-0.6.1 lib/vagrant-managed-servers/config.rb
vagrant-managed-servers-0.6.0 lib/vagrant-managed-servers/config.rb
vagrant-managed-servers-0.5.1 lib/vagrant-managed-servers/config.rb
vagrant-managed-servers-0.5.0 lib/vagrant-managed-servers/config.rb
vagrant-managed-servers-0.4.1 lib/vagrant-managed-servers/config.rb
vagrant-managed-servers-0.4.0 lib/vagrant-managed-servers/config.rb
vagrant-managed-servers-0.3.0 lib/vagrant-managed-servers/config.rb
vagrant-managed-servers-0.2.0 lib/vagrant-managed-servers/config.rb
vagrant-managed-servers-0.1.0 lib/vagrant-managed-servers/config.rb