Class: Archimate::FileFormats::ModelExchangeFileWriter30
- Inherits:
-
Serializer::ModelExchangeFile::ModelExchangeFileWriter
- Object
- Serializer::Writer
- Serializer::ModelExchangeFile::ModelExchangeFileWriter
- Archimate::FileFormats::ModelExchangeFileWriter30
- Includes:
- Serializer::ModelExchangeFile::Element, Serializer::ModelExchangeFile::Location, Serializer::ModelExchangeFile::Organization, Serializer::ModelExchangeFile::Properties, Serializer::ModelExchangeFile::Relationship, Serializer::ModelExchangeFile::Style, Serializer::ModelExchangeFile::V30::Connection, Serializer::ModelExchangeFile::V30::Diagram, Serializer::ModelExchangeFile::V30::Item, Serializer::ModelExchangeFile::V30::Label, Serializer::ModelExchangeFile::V30::Model, Serializer::ModelExchangeFile::V30::OrganizationBody, Serializer::ModelExchangeFile::V30::Property, Serializer::ModelExchangeFile::V30::ViewNode
- Defined in:
- lib/archimate/file_formats/model_exchange_file_writer_30.rb
Instance Attribute Summary
Attributes inherited from Serializer::ModelExchangeFile::ModelExchangeFileWriter
Attributes inherited from Serializer::Writer
Instance Method Summary collapse
- #font_style_string(font) ⇒ Object
-
#initialize(model) ⇒ ModelExchangeFileWriter30
constructor
A new instance of ModelExchangeFileWriter30.
- #meff_type(el_type) ⇒ Object
- #relationship_attributes(relationship) ⇒ Object
Methods included from Serializer::ModelExchangeFile::V30::ViewNode
#serialize_view_node, #view_node_attrs
Methods included from Serializer::ModelExchangeFile::Style
#serialize_color, #serialize_font, #serialize_style
Methods included from Serializer::ModelExchangeFile::Relationship
Methods included from Serializer::ModelExchangeFile::Properties
Methods included from Serializer::ModelExchangeFile::V30::Property
Methods included from Serializer::ModelExchangeFile::V30::OrganizationBody
Methods included from Serializer::ModelExchangeFile::Organization
Methods included from Serializer::ModelExchangeFile::V30::Model
#model_attrs, #serialize_model
Methods included from Serializer::ModelExchangeFile::Location
Methods included from Serializer::ModelExchangeFile::V30::Label
Methods included from Serializer::ModelExchangeFile::V30::Item
Methods included from Serializer::ModelExchangeFile::Element
#elementbase, #serialize_element
Methods included from Serializer::ModelExchangeFile::V30::Diagram
Methods included from Serializer::ModelExchangeFile::V30::Connection
Methods inherited from Serializer::ModelExchangeFile::ModelExchangeFileWriter
Methods inherited from Serializer::Writer
Constructor Details
#initialize(model) ⇒ ModelExchangeFileWriter30
Returns a new instance of ModelExchangeFileWriter30.
22 23 24 |
# File 'lib/archimate/file_formats/model_exchange_file_writer_30.rb', line 22 def initialize(model) super end |
Instance Method Details
#font_style_string(font) ⇒ Object
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/archimate/file_formats/model_exchange_file_writer_30.rb', line 37 def font_style_string(font) case font&.style when 1 "italic" when 2 "bold" when 3 "bold italic" end end |
#meff_type(el_type) ⇒ Object
48 49 50 |
# File 'lib/archimate/file_formats/model_exchange_file_writer_30.rb', line 48 def meff_type(el_type) el_type.sub(/^/, "") end |
#relationship_attributes(relationship) ⇒ Object
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/archimate/file_formats/model_exchange_file_writer_30.rb', line 26 def relationship_attributes(relationship) attrs = { identifier: identifier(relationship.id), source: identifier(relationship.source.id), target: identifier(relationship.target.id), "xsi:type" => meff_type(relationship.type) } attrs["accessType"] = relationship.access_type if relationship.access_type attrs end |