Method: Fog::Compute::LibvirtUtil#xml_elements
- Defined in:
- lib/fog/libvirt/models/compute/util/util.rb
#xml_elements(xml, path, attribute = nil) ⇒ Object
15 16 17 18 |
# File 'lib/fog/libvirt/models/compute/util/util.rb', line 15 def xml_elements(xml, path, attribute=nil) xml = Nokogiri::XML(xml) attribute.nil? ? (xml/path).map : (xml/path).map{|element| element[attribute.to_sym]} end |