| Class | Fog::Storage::Rackspace::Mock::MockContainer |
| In: |
lib/fog/rackspace/storage.rb
|
| Parent: | Object |
An in-memory container for use with Rackspace storage mocks. Includes many `objects` mapped by (escaped) object name. Tracks container metadata.
| meta | [R] | |
| objects | [R] | |
| service | [R] |
Create a new container. Generally, you should call {Fog::Rackspace::Storage#add_container} instead.
Add a new MockObject to this container. An existing object with the same name will be overwritten.
@param name [String] The object‘s name, unescaped. @param data [String, read] The contents of the object.
Total sizes of all objects added to this container.
@return [Integer] The number of bytes occupied by each contained
object.
Access a MockObject within this container by (unescaped) name.
@return [MockObject, nil] Return the MockObject at this name if
one exists; otherwise, `nil`.
Access a MockObject with a specific name, raising a `Fog::Storage::Rackspace::NotFound` exception if none are present.
@param name [String] (Unescaped) object name. @return [MockObject] The object within this container with the
specified name.
Remove a MockObject from the container by name. No effect if the object is not present beforehand.
@param name [String] The (unescaped) object name to remove.