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