Method: Docker::Volume.all

Defined in:
lib/docker/volume.rb

.all(opts = {}, conn = Docker.connection) ⇒ Object

/volumes endpoint returns an array of hashes incapsulated in an Volumes tag



24
25
26
27
28
29
# File 'lib/docker/volume.rb', line 24

def all(opts = {}, conn = Docker.connection)
  resp = conn.get('/volumes')
  json = Docker::Util.parse_json(resp) || {}
  hashes = json['Volumes'] || []
  hashes.map { |hash| new(conn, hash) }
end