Class: Fog::Rackspace::Databases::Flavors

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/rackspace/models/databases/flavors.rb

Instance Method Summary collapse

Instance Method Details

#allObject



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

def all
  data = service.list_flavors.body['flavors']
  load(data)
end

#get(flavor_id) ⇒ Object



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

def get(flavor_id)
  data = service.get_flavor(flavor_id).body['flavor']
  new(data)
rescue Fog::Rackspace::Databases::NotFound
  nil
end