Method: Fog::Ecloud::Compute::InternetServices#get

Defined in:
lib/fog/compute/models/ecloud/internet_services.rb

#get(uri) ⇒ Object

Optimize later, no need to get_internet_services again?



20
21
22
23
24
25
26
27
28
# File 'lib/fog/compute/models/ecloud/internet_services.rb', line 20

def get(uri)
  internet_services = connection.get_internet_services(href).body[:InternetService]
  internet_services = [ internet_services ] if internet_services.is_a?(Hash)
  if data = internet_services.detect { |service| service[:Href] == uri }
    new(data)
  end
rescue Fog::Errors::NotFound
  nil
end