Module: Archimate::FileFormats::Serializer::ModelExchangeFile::V21::Diagram

Included in:
ModelExchangeFileWriter21
Defined in:
lib/archimate/file_formats/serializer/model_exchange_file/v21/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/v21/diagram.rb', line 9

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