Module: Archimate::FileFormats::Serializer::ModelExchangeFile::V30::Diagram

Included in:
ModelExchangeFileWriter30
Defined in:
lib/archimate/file_formats/serializer/model_exchange_file/v30/diagram.rb

Instance Method Summary collapse

Instance Method Details

#serialize_diagram(xml, diagram) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/archimate/file_formats/serializer/model_exchange_file/v30/diagram.rb', line 9

def serialize_diagram(xml, diagram)
  xml.view(
    {
      identifier: identifier(diagram.id),
      "xsi:type": diagram.type,
      viewpoint: diagram.viewpoint&.name
    }.compact
  ) do
    elementbase(xml, diagram)
    serialize(xml, diagram.nodes)
    serialize(xml, diagram.connections)
  end
end