Module: Mumlx_EnumeratedValue
- Included in:
- Cuml_AggregationKind, Cuml_CallConcurrencyKind, Cuml_ConnectorKind, Cuml_ExpansionKind, Cuml_InteractionOperator, Cuml_MessageKind, Cuml_MessageSort, Cuml_ObjectNodeOrderingKind, Cuml_ParameterDirectionKind, Cuml_ParameterEffectKind, Cuml_PseudostateKind, Cuml_TransitionKind, Cuml_VisibilityKind
- Defined in:
- lib/ontomde-uml2/enumerated.rb
Overview
Enumerated type helpers.
Detects UML enumerated types and provides helper methods and constants.
EXAMPLE:
constant: Cuml_visibilityKind::Public
method: Cuml_visibilityKind isPublic?
NOTE: UML Enumerated type are declared in this file.
Instance Method Summary collapse
-
#initialize(model, uri) ⇒ Object
Internal use.
Instance Method Details
#initialize(model, uri) ⇒ Object
Internal use
12 13 14 15 16 17 18 19 20 |
# File 'lib/ontomde-uml2/enumerated.rb', line 12 def initialize(model,uri) super(model,uri) a=uri.split("_",3) v=a[2].capitalize @@z=self cmd="class ::#{self.class}< ::Crdfs_Class\n public\n #{v}=@@z\n def is#{v}?\n return self==#{v}\n end\n end" eval(cmd) @@z=nil end |