class Fog::Compute::Linode::DataCenters
Public Instance Methods
all()
click to toggle source
# File lib/fog/linode/models/compute/data_centers.rb, line 10 def all load datacenters end
Private Instance Methods
datacenters(id=nil)
click to toggle source
# File lib/fog/linode/models/compute/data_centers.rb, line 15 def datacenters(id=nil) service.avail_datacenters.body['DATA'].map { |datacenter| map_datacenter datacenter } end
map_datacenter(datacenter)
click to toggle source
# File lib/fog/linode/models/compute/data_centers.rb, line 19 def map_datacenter(datacenter) datacenter = datacenter.each_with_object({}) { |(k, v), h| h[k.downcase.to_sym] = v } datacenter.merge! :id => datacenter[:datacenterid], :name => datacenter[:location] end