Class: Docker::API

Inherits:
Object
  • Object
show all
Defined in:
lib/docker/api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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(options)
  @debug      = options[:debug]
  @ssl        = options[:ssl] || { :verify => false }
  base_url    = options[: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

#connectionObject (readonly)

Returns the value of attribute connection.



8
9
10
# File 'lib/docker/api.rb', line 8

def connection
  @connection
end

Instance Method Details

#containersObject



19
20
21
# File 'lib/docker/api.rb', line 19

def containers
  Docker::Resource::Container.new(@connection)
end

#imagesObject



23
24
25
# File 'lib/docker/api.rb', line 23

def images
  Docker::Resource::Image.new(@connection)
end

#systemObject



27
28
29
# File 'lib/docker/api.rb', line 27

def system
  
end