Method: Docker::Model::ClassMethods#all
- Defined in:
- lib/docker/model.rb
#all(options = {}, connection = Docker.connection) ⇒ Object
Retrieve every Instance of a model for the given server.
71 72 73 74 75 |
# File 'lib/docker/model.rb', line 71 def all( = {}, connection = Docker.connection) path = "#{resource_prefix}/json" hashes = Docker::Util.parse_json(connection.get(path, )) || [] hashes.map { |hash| new(:id => hash['Id'], :connection => connection) } end |