Class: Libvirt::Spec::Device::Emulator

Inherits:
Object
  • Object
show all
Defined in:
lib/libvirt/spec/device/emulator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ Emulator

Initialize an emulator device with the given path. The capabilities XML from Connection describes what emulators are available.



9
10
11
# File 'lib/libvirt/spec/device/emulator.rb', line 9

def initialize(path)
  @path = path
end

Instance Attribute Details

#pathObject

Returns the value of attribute path.



5
6
7
# File 'lib/libvirt/spec/device/emulator.rb', line 5

def path
  @path
end

Instance Method Details

#to_xml(xml = Nokogiri::XML::Builder.new) ⇒ String

Returns the XML for this device.

Returns:

  • (String)


16
17
18
19
# File 'lib/libvirt/spec/device/emulator.rb', line 16

def to_xml(xml=Nokogiri::XML::Builder.new)
  xml.emulator path
  xml.to_xml
end