Class: Fog::Compute::ProfitBricks::Images

Inherits:
Fog::Collection
  • Object
show all
Defined in:
lib/fog/profitbricks/models/compute/images.rb

Instance Method Summary collapse

Instance Method Details

#allObject



10
11
12
# File 'lib/fog/profitbricks/models/compute/images.rb', line 10

def all
  load(service.get_all_images.body["getAllImagesResponse"])
end

#get(id) ⇒ Object



14
15
16
17
18
19
# File 'lib/fog/profitbricks/models/compute/images.rb', line 14

def get(id)
  image = service.get_image(id).body["getImageResponse"]
  new(image)
rescue Fog::Errors::NotFound
  nil
end