Class: CIM::Property

Inherits:
ClassFeature show all
Defined in:
lib/cim/property.rb

Overview

A Property defines a data member of a Class.

For method members, see Method.

Direct Known Subclasses

Reference

Instance Attribute Summary collapse

Attributes inherited from ClassFeature

#type

Attributes inherited from NamedElement

#name, #qualifiers

Instance Method Summary collapse

Methods inherited from ClassFeature

#key?, #method?, #reference?, #static?

Methods inherited from NamedElement

#<<, #include?, #to_s

Constructor Details

#initialize(type, name, qualifier_set = nil, default = nil) ⇒ Property

Create a Property with type (Type) and name (String), optional QualifierSet and default value

call-seq:

Property.new(:boolean, "flag")
Property.new(:boolean, "flag", qualifier_set)
Property.new(:boolean, "flag", qualifier_set, true)


26
27
28
29
# File 'lib/cim/property.rb', line 26

def initialize type, name, qualifier_set=nil, default=nil
  @default = default
  super type, name, qualifier_set
end

Instance Attribute Details

#defaultObject (readonly)

Returns the value of attribute default.



17
18
19
# File 'lib/cim/property.rb', line 17

def default
  @default
end

Instance Method Details

#property?Boolean

Makes a Property recognizable in the set of Class features.

Returns:

  • (Boolean)


33
34
35
# File 'lib/cim/property.rb', line 33

def property?
  true
end