class OVIRT::Host
Attributes
address[R]
cluster[R]
description[R]
status[R]
Public Class Methods
new(client, xml)
click to toggle source
Calls superclass method
OVIRT::BaseObject.new
# File lib/ovirt/host.rb, line 5 def initialize(client, xml) super(client, xml[:id], xml[:href], (xml/'name').first.text) parse_xml_attributes!(xml) self end
Private Instance Methods
parse_xml_attributes!(xml)
click to toggle source
# File lib/ovirt/host.rb, line 13 def parse_xml_attributes!(xml) @description = ((xml/'description').first.text rescue nil) @address = ((xml/'address').first.text rescue nil) @status = (xml/'status').first.text @cluster = Link::new(@client, (xml/'cluster').first[:id], (xml/'cluster').first[:href]) end