Class: Ea::Sources::Qea::Xref::StereotypeApplication
- Inherits:
-
Struct
- Object
- Struct
- Ea::Sources::Qea::Xref::StereotypeApplication
- Defined in:
- lib/ea/sources/qea/xref/stereotype_application.rb
Overview
Stereotype application record. Produced when the Description
starts with @STEREO;. Captures the short name and the
fully-qualified tech::Stereo form when present.
Example source:
@STEREO;Name=FeatureType;FQName=GML::FeatureType;@ENDSTEREO;
Instance Attribute Summary collapse
-
#fqname ⇒ Object
Returns the value of attribute fqname.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#technology ⇒ String?
Returns the technology prefix from FQName, or nil.
-
#unqualified_name ⇒ String?
Returns the stereotype name without technology prefix.
Instance Attribute Details
#fqname ⇒ Object
Returns the value of attribute fqname
13 14 15 |
# File 'lib/ea/sources/qea/xref/stereotype_application.rb', line 13 def fqname @fqname end |
#name ⇒ Object
Returns the value of attribute name
13 14 15 |
# File 'lib/ea/sources/qea/xref/stereotype_application.rb', line 13 def name @name end |
Instance Method Details
#technology ⇒ String?
Returns the technology prefix from FQName, or nil.
16 17 18 19 20 21 |
# File 'lib/ea/sources/qea/xref/stereotype_application.rb', line 16 def technology return nil unless fqname idx = fqname.index("::") idx ? fqname[0, idx] : nil end |
#unqualified_name ⇒ String?
Returns the stereotype name without technology prefix.
Falls back to name when FQName is absent.
26 27 28 29 30 31 32 |
# File 'lib/ea/sources/qea/xref/stereotype_application.rb', line 26 def unqualified_name if fqname && fqname.include?("::") fqname.split("::", 2).last else name end end |