Class: Fog::Compute::Packet::Batches
- Inherits:
-
Fog::Collection
- Object
- Fog::Collection
- Fog::Compute::Packet::Batches
- Defined in:
- lib/fog/compute/packet/models/batches.rb
Overview
Batches Collection
Instance Method Summary collapse
Instance Method Details
#all(project_id, params = {}) ⇒ Object
10 11 12 13 |
# File 'lib/fog/compute/packet/models/batches.rb', line 10 def all(project_id, params = {}) response = service.list_batches(project_id, params) load(response.body["batches"]) end |
#create(project_id, batches) ⇒ Object
20 21 22 23 |
# File 'lib/fog/compute/packet/models/batches.rb', line 20 def create(project_id, batches) response = service.create_batch(project_id, batches) load(response.body["batches"]) end |
#get(id) ⇒ Object
15 16 17 18 |
# File 'lib/fog/compute/packet/models/batches.rb', line 15 def get(id) response = service.get_batch(id) new(response.body) end |