Class: Docker::Remote::BasicAuth
- Inherits:
-
Object
- Object
- Docker::Remote::BasicAuth
- Defined in:
- lib/docker/remote/basic_auth.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
-
#initialize(username, password) ⇒ BasicAuth
constructor
A new instance of BasicAuth.
- #make_get(path) ⇒ Object
Constructor Details
#initialize(username, password) ⇒ BasicAuth
Returns a new instance of BasicAuth.
8 9 10 11 |
# File 'lib/docker/remote/basic_auth.rb', line 8 def initialize(username, password) @username = username @password = password end |
Instance Attribute Details
#password ⇒ Object (readonly)
Returns the value of attribute password.
6 7 8 |
# File 'lib/docker/remote/basic_auth.rb', line 6 def password @password end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
6 7 8 |
# File 'lib/docker/remote/basic_auth.rb', line 6 def username @username end |
Instance Method Details
#make_get(path) ⇒ Object
13 14 15 16 17 |
# File 'lib/docker/remote/basic_auth.rb', line 13 def make_get(path) Net::HTTP::Get.new(path).tap do |request| request.basic_auth(username, password) end end |