Class: VagrantPlugins::ProxyConf::Config::AptProxy::AptProxyURI Private

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-proxyconf/config/apt_proxy.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Helper for constructing configuration values for apt.conf

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scheme, value) ⇒ AptProxyURI

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of AptProxyURI.

Parameters:

  • scheme (String)

    the protocol (“http”, “https”, …)

  • value (Object)

    the configuration value



52
53
54
55
# File 'lib/vagrant-proxyconf/config/apt_proxy.rb', line 52

def initialize(scheme, value)
  @scheme = scheme
  @value = value
end

Instance Attribute Details

#schemeObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



48
49
50
# File 'lib/vagrant-proxyconf/config/apt_proxy.rb', line 48

def scheme
  @scheme
end

#valueObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



48
49
50
# File 'lib/vagrant-proxyconf/config/apt_proxy.rb', line 48

def value
  @value
end

Instance Method Details

#to_sObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



57
58
59
# File 'lib/vagrant-proxyconf/config/apt_proxy.rb', line 57

def to_s
  direct || "#{prefix}#{value}#{suffix}"
end