Class: Docker::API
- Inherits:
-
Object
- Object
- Docker::API
- Defined in:
- lib/docker/api.rb
Instance Attribute Summary collapse
-
#connection ⇒ Object
readonly
Returns the value of attribute connection.
Instance Method Summary collapse
- #containers ⇒ Object
- #images ⇒ Object
-
#initialize(options) ⇒ API
constructor
A new instance of API.
- #system ⇒ Object
Constructor Details
#initialize(options) ⇒ API
Returns a new instance of API.
10 11 12 13 14 15 16 17 |
# File 'lib/docker/api.rb', line 10 def initialize() @debug = [:debug] @ssl = [:ssl] || { :verify => false } base_url = [:base_url] @connection = Docker::Connection.new(base_url: base_url) # @faraday_adapter = options[:faraday_adapter] || Faraday.default_adapter # @faraday = options[:faraday] || default_faraday end |
Instance Attribute Details
#connection ⇒ Object (readonly)
Returns the value of attribute connection.
8 9 10 |
# File 'lib/docker/api.rb', line 8 def connection @connection end |
Instance Method Details
#containers ⇒ Object
19 20 21 |
# File 'lib/docker/api.rb', line 19 def containers Docker::Resource::Container.new(@connection) end |
#images ⇒ Object
23 24 25 |
# File 'lib/docker/api.rb', line 23 def images Docker::Resource::Image.new(@connection) end |
#system ⇒ Object
27 28 29 |
# File 'lib/docker/api.rb', line 27 def system end |