Class: Fog::Rackspace::CDNV2::Flavors

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

Instance Method Summary collapse

Instance Method Details

#allObject



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

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

#get(name) ⇒ Object



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

def get(name)
  data = service.get_flavor(name).body
  new(data)
rescue Fog::Rackspace::CDNV2::NotFound
  nil
end