Class: Vixen::Model::Host
- Inherits:
-
Base
- Object
- Base
- Vixen::Model::Host
show all
- Defined in:
- lib/vixen/model/host.rb
Instance Attribute Summary
Attributes inherited from Base
#handle
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#get_string_property, #initialize
Class Method Details
.finalize(handle) ⇒ Object
5
6
7
8
9
|
# File 'lib/vixen/model/host.rb', line 5
def self.finalize(handle)
proc do
Vixen::Bridge.disconnect(handle)
end
end
|
Instance Method Details
#open_vm(path, &block) ⇒ Object
#paths_of_running_vms(&block) ⇒ Object
23
24
25
|
# File 'lib/vixen/model/host.rb', line 23
def paths_of_running_vms(&block)
Vixen::Bridge.running_vms(handle, &block) || []
end
|
#running_vms(&block) ⇒ Object
15
16
17
18
19
20
21
|
# File 'lib/vixen/model/host.rb', line 15
def running_vms(&block)
vms = []
paths_of_running_vms(&block).each do |path|
vms << open_vm(path, &block)
end
vms
end
|