Class: WBEM::CIMMethod
- Includes:
- Comparable
- Defined in:
- lib/wbem/cim_obj.rb
Instance Attribute Summary collapse
-
#class_origin ⇒ Object
Returns the value of attribute class_origin.
-
#name ⇒ Object
Returns the value of attribute name.
-
#parameters ⇒ Object
Returns the value of attribute parameters.
-
#propagated ⇒ Object
Returns the value of attribute propagated.
-
#qualifiers ⇒ Object
Returns the value of attribute qualifiers.
-
#return_type ⇒ Object
Returns the value of attribute return_type.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
- #clone ⇒ Object
-
#initialize(methodname, return_type = nil, parameters = {}, class_origin = nil, propagated = false, qualifiers = {}) ⇒ CIMMethod
constructor
A new instance of CIMMethod.
- #to_s ⇒ Object
- #tocimxml ⇒ Object
Methods inherited from XMLObject
#cmpname, #eql?, #hash, #nilcmp, #toxml
Constructor Details
#initialize(methodname, return_type = nil, parameters = {}, class_origin = nil, propagated = false, qualifiers = {}) ⇒ CIMMethod
Returns a new instance of CIMMethod.
856 857 858 859 860 861 862 863 |
# File 'lib/wbem/cim_obj.rb', line 856 def initialize(methodname, return_type = nil, parameters = {}, class_origin = nil, propagated = false, qualifiers = {} ) @name = methodname @return_type = return_type @parameters = NocaseHash.new(parameters) @class_origin = class_origin @propagated = propagated @qualifiers = NocaseHash.new(qualifiers) end |
Instance Attribute Details
#class_origin ⇒ Object
Returns the value of attribute class_origin.
854 855 856 |
# File 'lib/wbem/cim_obj.rb', line 854 def class_origin @class_origin end |
#name ⇒ Object
Returns the value of attribute name.
854 855 856 |
# File 'lib/wbem/cim_obj.rb', line 854 def name @name end |
#parameters ⇒ Object
Returns the value of attribute parameters.
854 855 856 |
# File 'lib/wbem/cim_obj.rb', line 854 def parameters @parameters end |
#propagated ⇒ Object
Returns the value of attribute propagated.
854 855 856 |
# File 'lib/wbem/cim_obj.rb', line 854 def propagated @propagated end |
#qualifiers ⇒ Object
Returns the value of attribute qualifiers.
854 855 856 |
# File 'lib/wbem/cim_obj.rb', line 854 def qualifiers @qualifiers end |
#return_type ⇒ Object
Returns the value of attribute return_type.
854 855 856 |
# File 'lib/wbem/cim_obj.rb', line 854 def return_type @return_type end |
Instance Method Details
#<=>(other) ⇒ Object
887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 |
# File 'lib/wbem/cim_obj.rb', line 887 def <=>(other) ret_val = 0 if equal?(other) return 0 elsif (!other.kind_of?(CIMMethod)) return 1 end ret_val = cmpname(self.name, other.name) ret_val = nilcmp(self.parameters, other.parameters) if (ret_val == 0) ret_val = nilcmp(self.qualifiers, other.qualifiers) if (ret_val == 0) ret_val = nilcmp(self.class_origin, other.class_origin) if (ret_val == 0) ret_val = nilcmp(self.propagated, other.propagated) if (ret_val == 0) ret_val = nilcmp(self.return_type, other.return_type) if (ret_val == 0) ret_val end |
#clone ⇒ Object
865 866 867 868 |
# File 'lib/wbem/cim_obj.rb', line 865 def clone return CIMMethod.new(@name, @return_type, @parameters, @class_origin, @propagated, @qualifiers) end |
#to_s ⇒ Object
903 904 905 |
# File 'lib/wbem/cim_obj.rb', line 903 def to_s "#{self.class}(name=#{self.name}, return_type=#{self.return_type}...)" end |
#tocimxml ⇒ Object
878 879 880 881 882 883 884 885 |
# File 'lib/wbem/cim_obj.rb', line 878 def tocimxml METHOD.new(self.name, self.parameters.values.collect {|p| p.tocimxml()}, self.return_type, self.class_origin, self.propagated, self.qualifiers.values.collect {|q| q.tocimxml()}) end |