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
5 def initialize(client, xml)
6   super(client, xml[:id], xml[:href], (xml/'name').first.text)
7   parse_xml_attributes!(xml)
8   self
9 end

Private Instance Methods

parse_xml_attributes!(xml) click to toggle source
   # File lib/ovirt/host.rb
13 def parse_xml_attributes!(xml)
14   @description = ((xml/'description').first.text rescue nil)
15   @address = ((xml/'address').first.text rescue nil)
16   @status = (xml/'status').first.text
17   @cluster = Link::new(@client, (xml/'cluster').first[:id], (xml/'cluster').first[:href])
18 end