Class: VagrantPlugins::DockerLoginProvisioner::Config
- Inherits:
-
Object
- Object
- VagrantPlugins::DockerLoginProvisioner::Config
- Defined in:
- lib/vagrant-docker-login/config.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
-
#password ⇒ Object
Returns the value of attribute password.
-
#server ⇒ Object
Returns the value of attribute server.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
- #finalize! ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
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
#email ⇒ Object
Returns the value of attribute email.
4 5 6 |
# File 'lib/vagrant-docker-login/config.rb', line 4 def email @email end |
#password ⇒ Object
Returns the value of attribute password.
4 5 6 |
# File 'lib/vagrant-docker-login/config.rb', line 4 def password @password end |
#server ⇒ Object
Returns the value of attribute server.
4 5 6 |
# File 'lib/vagrant-docker-login/config.rb', line 4 def server @server end |
#username ⇒ Object
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 |