class RbVmomi::VIM::ResourcePool

Public Instance Methods

find(name) click to toggle source

Retrieve a child ResourcePool. @param name [String] Name of the child. @return [VIM::ResourcePool]

# File lib/rbvmomi/vim/ResourcePool.rb, line 5
def find name
  @soap.searchIndex.FindChild(:entity => self, :name => name)
end
traverse(path) click to toggle source

Retrieve a descendant of this ResourcePool. @param path [String] Path delimited by '/'. @return [VIM::ResourcePool]

# File lib/rbvmomi/vim/ResourcePool.rb, line 12
def traverse path
  es = path.split('/').reject(&:empty?)
  es.inject(self) do |f,e|
    f.find(e) || return
  end
end