Class: CIM::ClassFeature

Inherits:
NamedElement show all
Defined in:
lib/cim/class_feature.rb

Overview

ClassFeature is the base class for Class Property and Method

A ClassFeature has a type (Type), name (String), and optional Qualifiers

Access to ClassFeature attributes is protected, use the derived classes Property, Method and Reference

Direct Known Subclasses

Method, Property

Instance Attribute Summary collapse

Attributes inherited from NamedElement

#name, #qualifiers

Instance Method Summary collapse

Methods inherited from NamedElement

#<<, #include?

Instance Attribute Details

#typeObject (readonly)

Returns the value of attribute type.



20
21
22
# File 'lib/cim/class_feature.rb', line 20

def type
  @type
end

Instance Method Details

#key?Boolean

if has key qualifier

Returns:

  • (Boolean)


24
25
26
# File 'lib/cim/class_feature.rb', line 24

def key?
  @qualifiers && @qualifiers.include?(:key,:boolean)
end

#method?Boolean

if Method

Returns:

  • (Boolean)


42
43
44
# File 'lib/cim/class_feature.rb', line 42

def method?
  false
end

#property?Boolean

if Property

Returns:

  • (Boolean)


36
37
38
# File 'lib/cim/class_feature.rb', line 36

def property?
  false
end

#reference?Boolean

if Reference

Returns:

  • (Boolean)


48
49
50
# File 'lib/cim/class_feature.rb', line 48

def reference?
  false
end

#static?Boolean

if static (class-level) feature

Returns:

  • (Boolean)


30
31
32
# File 'lib/cim/class_feature.rb', line 30

def static?
  false
end