Class: Libvirt::Spec::Device::Emulator
- Inherits:
-
Object
- Object
- Libvirt::Spec::Device::Emulator
- Defined in:
- lib/libvirt/spec/device/emulator.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(path) ⇒ Emulator
constructor
Initialize an emulator device with the given path.
-
#to_xml(xml = Nokogiri::XML::Builder.new) ⇒ String
Returns the XML for this device.
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
#path ⇒ Object
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.
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 |