Class: VagrantPlugins::ProviderLibvirt::Util::Xml
- Inherits:
-
Object
- Object
- VagrantPlugins::ProviderLibvirt::Util::Xml
- Defined in:
- lib/vagrant-libvirt/util/xml.rb
Instance Attribute Summary collapse
-
#xml ⇒ Object
readonly
Returns the value of attribute xml.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(xmlstr) ⇒ Xml
constructor
A new instance of Xml.
- #to_str ⇒ Object
Constructor Details
#initialize(xmlstr) ⇒ Xml
Returns a new instance of Xml.
11 12 13 |
# File 'lib/vagrant-libvirt/util/xml.rb', line 11 def initialize(xmlstr) @xml = compact_content(XmlSimple.xml_in(xmlstr, {'NormaliseSpace' => 2})) end |
Instance Attribute Details
#xml ⇒ Object (readonly)
Returns the value of attribute xml.
9 10 11 |
# File 'lib/vagrant-libvirt/util/xml.rb', line 9 def xml @xml end |
Instance Method Details
#==(other) ⇒ Object
19 20 21 |
# File 'lib/vagrant-libvirt/util/xml.rb', line 19 def ==(other) @xml == other.xml end |
#to_str ⇒ Object
15 16 17 |
# File 'lib/vagrant-libvirt/util/xml.rb', line 15 def to_str XmlSimple.xml_out(@xml) end |