Sha256: cd4b3605e770a3beb969544a10dd2057f8561e896ff4c70e15f2cf49f6240cc1
Contents?: true
Size: 760 Bytes
Versions: 8
Compression:
Stored size: 760 Bytes
Contents
module OVIRT class DataCenter < BaseObject attr_reader :description, :status, :storage_type, :storage_format, :supported_versions, :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 @status = (xml/'status').first.text.strip @storage_type = (xml/'storage_type').first.text rescue nil @storage_format = (xml/'storage_format').first.text rescue nil @supported_versions = (xml/'supported_versions').collect { |v| parse_version v } @version = parse_version xml rescue nil end end end
Version data entries
8 entries across 8 versions & 1 rubygems