Class: Fog::Compute::Ninefold::Flavors

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

Instance Method Summary collapse

Instance Method Details

#allObject



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

def all
  data = service.list_service_offerings
  load(data)
end

#get(identifier) ⇒ Object



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

def get(identifier)
  data = service.list_service_offerings(:id => identifier)
  if data.empty?
    nil
  else
    new(data[0])
  end
end