Class: Fog::Scaleway::Compute::Volumes
- Inherits:
-
Collection
- Object
- Collection
- Fog::Scaleway::Compute::Volumes
- Defined in:
- lib/fog/scaleway/models/compute/volumes.rb
Instance Method Summary collapse
Instance Method Details
#all ⇒ Object
7 8 9 10 |
# File 'lib/fog/scaleway/models/compute/volumes.rb', line 7 def all volumes = service.list_volumes.body['volumes'] || [] load(volumes) end |
#get(identity) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/fog/scaleway/models/compute/volumes.rb', line 12 def get(identity) if (volume = service.get_volume(identity).body['volume']) new(volume) end rescue Fog::Scaleway::Compute::UnknownResource nil end |