Class: Docker::API::Volume
- Defined in:
- lib/docker/api/resources/volume.rb
Overview
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
-
#driver ⇒ String?
The driver backing this volume.
-
#id ⇒ String?
The volume's name, which is also its identifier.
-
#labels ⇒ Hash
The volume's labels.
-
#mountpoint ⇒ String?
Where the daemon keeps the volume's contents.
-
#name ⇒ String?
The volume's name.
- #reload ⇒ self
- #remove(force: false) ⇒ void
Methods inherited from Resource
#==, #[], #hash, #initialize, #partial?, #stale?, #to_s
Constructor Details
This class inherits a constructor from Docker::API::Resource
Instance Method Details
#driver ⇒ String?
Returns the driver backing this volume.
24 25 26 |
# File 'lib/docker/api/resources/volume.rb', line 24 def driver detail("Driver") end |
#id ⇒ String?
Returns the volume's name, which is also its identifier.
19 20 21 |
# File 'lib/docker/api/resources/volume.rb', line 19 def id name end |
#labels ⇒ Hash
Returns the volume's labels.
34 35 36 |
# File 'lib/docker/api/resources/volume.rb', line 34 def labels detail("Labels") || {} end |
#mountpoint ⇒ String?
Returns where the daemon keeps the volume's contents.
29 30 31 |
# File 'lib/docker/api/resources/volume.rb', line 29 def mountpoint detail("Mountpoint") end |
#name ⇒ String?
Returns the volume's name.
14 15 16 |
# File 'lib/docker/api/resources/volume.rb', line 14 def name raw["Name"] end |
#reload ⇒ self
39 40 41 |
# File 'lib/docker/api/resources/volume.rb', line 39 def reload replace_raw(operations.volume_inspect(name: name).json) end |
#remove(force: false) ⇒ void
This method returns an undefined value.
45 46 47 48 |
# File 'lib/docker/api/resources/volume.rb', line 45 def remove(force: false) operations.volume_delete(name: name, force: force) nil end |