Class: WBEM::CIMClassPath

Inherits:
CIMObjectLocation show all
Defined in:
lib/wbem/cim_obj.rb

Instance Attribute Summary

Attributes inherited from CIMObjectLocation

#classname, #host, #instancename, #localnamespacepath

Instance Method Summary collapse

Methods inherited from CIMObjectLocation

#<=>, #CLASSNAME, #HOST, #LOCALNAMESPACEPATH, #NAMESPACEPATH, #eql?, #hash

Methods inherited from XMLObject

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

Constructor Details

#initialize(localnamespacepath, classname) ⇒ CIMClassPath

Returns a new instance of CIMClassPath.



323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
# File 'lib/wbem/cim_obj.rb', line 323

def initialize(localnamespacepath, classname)
    unless host.kind_of?(String)
        raise TypeError, "host argument must be a string"
    end
    unless localnamespacepath.kind_of?(String)
        raise TypeError, "localnamespacepath argument must be a string"
    end
    unless classname.kind_of?(String)
        raise TypeError, "classname argument must be a string"
    end
    
    super()
    self.host=host
    self.classname=classname
    self.localnamespacepath=localnamespacepath
end

Instance Method Details

#to_sObject



344
345
346
# File 'lib/wbem/cim_obj.rb', line 344

def to_s
    "//#{self.host}/#{self.localnamespacepath}:#{self.classname}"
end

#tocimxmlObject



340
341
342
# File 'lib/wbem/cim_obj.rb', line 340

def tocimxml
    CLASSPATH.new(self.NAMESPACEPATH, self.CLASSNAME)
end