Class: Fog::Compute::Bluebox::Flavors

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

Instance Method Summary collapse

Instance Method Details

#allObject



10
11
12
13
# File 'lib/fog/bluebox/models/compute/flavors.rb', line 10

def all
  data = service.get_products.body
  load(data)
end

#get(product_id) ⇒ Object



15
16
17
18
19
20
# File 'lib/fog/bluebox/models/compute/flavors.rb', line 15

def get(product_id)
  response = service.get_product(product_id)
  new(response.body)
rescue Fog::Compute::Bluebox::NotFound
  nil
end