Module: Mumlx_EnumeratedValue

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

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