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

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

Instance Method Summary collapse

Instance Method Details

#allObject



9
10
11
# File 'lib/fog/compute/profit_bricks/models/images.rb', line 9

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

#get(id) ⇒ Object



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

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