Method: OvirtSDK4::AffinityGroupHostLabelsService#service

Defined in:
lib/ovirtsdk4/services.rb

#service(path) ⇒ Service

Locates the service corresponding to the given path.



1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
# File 'lib/ovirtsdk4/services.rb', line 1256

def service(path)
  if path.nil? || path == ''
    return self
  end
  index = path.index('/')
  if index.nil?
    return label_service(path)
  end
  return label_service(path[0..(index - 1)]).service(path[(index + 1)..-1])
end