Class: GOCD::Credentials
- Inherits:
-
Object
- Object
- GOCD::Credentials
- Defined in:
- lib/gocd/config/credentials.rb
Instance Attribute Summary collapse
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
- #curl_credentials ⇒ Object
-
#initialize(username, password) ⇒ Credentials
constructor
A new instance of Credentials.
Constructor Details
#initialize(username, password) ⇒ Credentials
Returns a new instance of Credentials.
7 8 9 10 |
# File 'lib/gocd/config/credentials.rb', line 7 def initialize(username, password) @username = username @password = password end |
Instance Attribute Details
#password ⇒ Object (readonly)
Returns the value of attribute password.
5 6 7 |
# File 'lib/gocd/config/credentials.rb', line 5 def password @password end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
5 6 7 |
# File 'lib/gocd/config/credentials.rb', line 5 def username @username end |
Instance Method Details
#curl_credentials ⇒ Object
12 13 14 |
# File 'lib/gocd/config/credentials.rb', line 12 def curl_credentials Shellwords.escape("#{@username}:#{@password}") end |