Module: Xumlidot::Diagram::Xmi::Attribute

Includes:
ID
Defined in:
lib/xumlidot/diagram/xmi/attribute.rb

Instance Method Summary collapse

Methods included from ID

#association_end_id, #association_id, #force_id, #gen_id, #id

Instance Method Details

#drawObject

TODO: - public/private visibility on attributes



12
13
14
15
16
# File 'lib/xumlidot/diagram/xmi/attribute.rb', line 12

def draw
  '<ownedAttribute aggregation="none" isDerived="false" isDerivedUnion="false" isID="false"' \
    " isLeaf=\"false\" isReadOnly=\"false\" isStatic=\"false\" name=\"#{name_to_xmi}\"" \
    " visibility=\"public\" xmi:id=\"#{id}\" xmi:type=\"uml:Property\"></ownedAttribute>"
end

#name_to_xmiObject



18
19
20
# File 'lib/xumlidot/diagram/xmi/attribute.rb', line 18

def name_to_xmi
  name&.encode(xml: :text)
end