Class: WBEM::KEYVALUE

Inherits:
CIMElement show all
Defined in:
lib/wbem/cim_xml.rb

Instance Method Summary collapse

Methods inherited from CIMElement

#add_elements, #add_optional_attribute, #add_optional_element, #setName, #toxml

Constructor Details

#initialize(data, value_type = nil, cim_type = nil) ⇒ KEYVALUE

<!ELEMENT KEYVALUE (#PCDATA)>

<!ATTLIST KEYVALUE
    VALUETYPE    (string|boolean|numeric)  'string'
    %CIMType;    #IMPLIED>
"""


607
608
609
610
611
612
613
614
615
616
617
618
# File 'lib/wbem/cim_xml.rb', line 607

def initialize(data, value_type = nil, cim_type = nil)
    super("KEYVALUE")
    if (value_type.nil?)
        self.add_attribute("VALUETYPE", "string")        
    else
        self.add_attribute("VALUETYPE", value_type)        
    end
    self.add_optional_attribute("TYPE", cim_type)
    unless data.nil?
        self.add_text(data)        
    end
end