class SwiftStorage::ContainerCollection

Public Instance Methods

[](name) click to toggle source

Return a particular container

@note This always return a container, regadeless of it's existence

on the server. This call do NOT contact the server.

@param name [String]

The name (sometimes named key) of the container

@return [SwiftStorage::Object]

Container with given name
# File lib/swift_storage/container_collection.rb, line 26
def [](name)
  SwiftStorage::Container.new(service, name) if name
end
all() click to toggle source

Return all containers

@note This method will return only the first 1000 containers.

@return [Array<SwiftStorage::Container>]

Containers in this collection.
# File lib/swift_storage/container_collection.rb, line 11
def all
  get_lines('').map { |name| SwiftStorage::Container.new(service, name)}
end