Sha256: 4c18a3fdcd7078df05075e1333116c7e88a90abf1a3c9a6c9cdb8f3818a9db04
Contents?: true
Size: 683 Bytes
Versions: 33
Compression:
Stored size: 683 Bytes
Contents
require 'fog/collection' require 'fog/rackspace/models/servers/flavor' module Fog module Rackspace module Servers module Collections def flavors Fog::Rackspace::Servers::Flavors.new(:connection => self) end end class Flavors < Fog::Collection model Fog::Rackspace::Servers::Flavor def all data = connection.list_flavors_detail.body['flavors'] load(data) end def get(flavor_id) data = connection.get_flavor_details(flavor_id).body['flavor'] new(data) rescue Fog::Rackspace::Servers::NotFound nil end end end end end
Version data entries
33 entries across 33 versions & 2 rubygems