Class: WBEM::CIMQualifier

Inherits:
XMLObject show all
Includes:
Comparable
Defined in:
lib/wbem/cim_obj.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from XMLObject

#cmpname, #eql?, #hash, #nilcmp, #toxml

Constructor Details

#initialize(name, value, propagated = nil, overridable = nil, tosubclass = nil, toinstance = nil, translatable = nil) ⇒ CIMQualifier

Returns a new instance of CIMQualifier.



986
987
988
989
990
991
992
993
994
995
996
# File 'lib/wbem/cim_obj.rb', line 986

def initialize(name, value, propagated=nil, overridable=nil,
               tosubclass=nil, toinstance=nil, translatable=nil)
    @name = name
    @value = value
    @overridable = overridable
    @propagated = propagated
    @toinstance = toinstance
    @tosubclass = tosubclass
    @translatable = translatable
    @qual_type = WBEM.cimtype(value)
end

Instance Attribute Details

#nameObject

Includes information such as a documentation string and whether a property is a key.“”“



984
985
986
# File 'lib/wbem/cim_obj.rb', line 984

def name
  @name
end

#overridableObject

Includes information such as a documentation string and whether a property is a key.“”“



984
985
986
# File 'lib/wbem/cim_obj.rb', line 984

def overridable
  @overridable
end

#propagatedObject

Includes information such as a documentation string and whether a property is a key.“”“



984
985
986
# File 'lib/wbem/cim_obj.rb', line 984

def propagated
  @propagated
end

#qual_typeObject

Includes information such as a documentation string and whether a property is a key.“”“



984
985
986
# File 'lib/wbem/cim_obj.rb', line 984

def qual_type
  @qual_type
end

#toinstanceObject

Includes information such as a documentation string and whether a property is a key.“”“



984
985
986
# File 'lib/wbem/cim_obj.rb', line 984

def toinstance
  @toinstance
end

#tosubclassObject

Includes information such as a documentation string and whether a property is a key.“”“



984
985
986
# File 'lib/wbem/cim_obj.rb', line 984

def tosubclass
  @tosubclass
end

#translatableObject

Includes information such as a documentation string and whether a property is a key.“”“



984
985
986
# File 'lib/wbem/cim_obj.rb', line 984

def translatable
  @translatable
end

#valueObject

Includes information such as a documentation string and whether a property is a key.“”“



984
985
986
# File 'lib/wbem/cim_obj.rb', line 984

def value
  @value
end

Instance Method Details

#<=>(other) ⇒ Object



1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
# File 'lib/wbem/cim_obj.rb', line 1007

def <=>(other)
    ret_val = 0
    if equal?(other)
        return 0
    elsif (!other.kind_of?(CIMQualifier))
        return 1
    end
    ret_val = cmpname(self.name, other.name)
    ret_val = nilcmp(self.value, other.value) if (ret_val == 0)
    ret_val = nilcmp(self.propagated, other.propagated) if (ret_val == 0)
    ret_val = nilcmp(self.overridable, other.overridable) if (ret_val == 0)
    ret_val = nilcmp(self.tosubclass, other.tosubclass) if (ret_val == 0)
    ret_val = nilcmp(self.toinstance, other.toinstance) if (ret_val == 0)
    ret_val = nilcmp(self.translatable, other.translatable) if (ret_val == 0)
    ret_val
end

#cloneObject



998
999
1000
1001
# File 'lib/wbem/cim_obj.rb', line 998

def clone
    CIMQualifier.new(@name, @value, @propagated, @overridable,
                     @tosubclass, @toinstance, @translatable)
end

#to_sObject



1003
1004
1005
# File 'lib/wbem/cim_obj.rb', line 1003

def to_s
    "#{self.class}(#{self.name}, #{self.value}, ...)"
end

#tocimxmlObject



1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
# File 'lib/wbem/cim_obj.rb', line 1023

def tocimxml
    QUALIFIER.new(self.name, 
                  self.qual_type,
                  WBEM.tocimxml(self.value),
                  self.propagated,
                  self.overridable,
                  self.tosubclass,
                  self.toinstance,
                  self.translatable)
end