Class: RbVmomi::VIM::ResourcePool
- Inherits:
-
Object
- Object
- RbVmomi::VIM::ResourcePool
- Defined in:
- lib/rbvmomi/vim/ResourcePool.rb
Instance Method Summary collapse
-
#find(name) ⇒ VIM::ResourcePool
Retrieve a child ResourcePool.
-
#traverse(path) ⇒ VIM::ResourcePool
Retrieve a descendant of this ResourcePool.
Instance Method Details
#find(name) ⇒ VIM::ResourcePool
Retrieve a child ResourcePool.
5 6 7 |
# File 'lib/rbvmomi/vim/ResourcePool.rb', line 5 def find name @soap.searchIndex.FindChild(:entity => self, :name => name) end |
#traverse(path) ⇒ VIM::ResourcePool
Retrieve a descendant of this ResourcePool.
12 13 14 15 16 17 |
# 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 |