Class: Armada::Docker::Credentials
- Inherits:
-
Object
- Object
- Armada::Docker::Credentials
- Defined in:
- lib/armada/docker/config.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(url, username, password, email) ⇒ Credentials
constructor
A new instance of Credentials.
Constructor Details
#initialize(url, username, password, email) ⇒ Credentials
Returns a new instance of Credentials.
39 40 41 42 43 44 |
# File 'lib/armada/docker/config.rb', line 39 def initialize(url, username, password, email) @username = username @password = password @email = email @url = url end |
Instance Attribute Details
#email ⇒ Object (readonly)
Returns the value of attribute email.
38 39 40 |
# File 'lib/armada/docker/config.rb', line 38 def email @email end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
38 39 40 |
# File 'lib/armada/docker/config.rb', line 38 def password @password end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
38 39 40 |
# File 'lib/armada/docker/config.rb', line 38 def url @url end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
38 39 40 |
# File 'lib/armada/docker/config.rb', line 38 def username @username end |
Class Method Details
.dummy ⇒ Object
51 52 53 |
# File 'lib/armada/docker/config.rb', line 51 def self.dummy() self.new '', nil, nil, '' end |
.parse(url, obj) ⇒ Object
46 47 48 49 |
# File 'lib/armada/docker/config.rb', line 46 def self.parse(url, obj) username, password = Base64.decode64(obj["auth"]).split(':', 2) return self.new url, username, password, obj["email"] end |