Sha256: 2270d8ab7d9cf6bdf2db8f3155523fa5803d1ffe1f493de23c2326354a9be294
Contents?: true
Size: 599 Bytes
Versions: 3
Compression:
Stored size: 599 Bytes
Contents
module OVIRT class Cluster < BaseObject attr_reader :description, :datacenter, :version def initialize(client, xml) super(client, xml[:id], xml[:href], (xml/'name').first.text) parse_xml_attributes!(xml) self end private def parse_xml_attributes!(xml) @description = ((xml/'description').first.text rescue nil) @version =((xml/'version').first[:major].strip rescue nil) unless (xml/'data_center').empty? @datacenter = Link::new(@client, (xml/'data_center').first[:id], (xml/'data_center').first[:href]) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rbovirt-0.0.3 | lib/ovirt/cluster.rb |
rbovirt-0.0.2 | lib/ovirt/cluster.rb |
rbovirt-0.0.1 | lib/ovirt/cluster.rb |