Class: VagrantPlugins::DockerLoginProvisioner::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-docker-login/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



6
7
8
9
10
11
# File 'lib/vagrant-docker-login/config.rb', line 6

def initialize
  @username = UNSET_VALUE
  @email = UNSET_VALUE
  @password = UNSET_VALUE
  @server = UNSET_VALUE
end

Instance Attribute Details

#emailObject

Returns the value of attribute email.



4
5
6
# File 'lib/vagrant-docker-login/config.rb', line 4

def email
  @email
end

#passwordObject

Returns the value of attribute password.



4
5
6
# File 'lib/vagrant-docker-login/config.rb', line 4

def password
  @password
end

#serverObject

Returns the value of attribute server.



4
5
6
# File 'lib/vagrant-docker-login/config.rb', line 4

def server
  @server
end

#usernameObject

Returns the value of attribute username.



4
5
6
# File 'lib/vagrant-docker-login/config.rb', line 4

def username
  @username
end

Instance Method Details

#finalize!Object



13
14
15
16
17
18
# File 'lib/vagrant-docker-login/config.rb', line 13

def finalize!
  @username = ENV["DOCKER_USERNAME"] if @username == UNSET_VALUE
  @email = ENV["DOCKER_EMAIL"] if @email == UNSET_VALUE
  @password = ENV["DOCKER_PASSWORD"] if @password == UNSET_VALUE
  @server = ENV["DOCKER_SERVER"] if @server == UNSET_VALUE
end