Class: Archimate::FileFormats::Serializer::XmlPropertyDefs
- Inherits:
-
Object
- Object
- Archimate::FileFormats::Serializer::XmlPropertyDefs
- Defined in:
- lib/archimate/file_formats/serializer/xml_property_defs.rb
Overview
Property Definitions as defined in ArchiMate 2.1 Model Exchange XSDs
Instance Method Summary collapse
-
#initialize(property_defs) ⇒ XmlPropertyDefs
constructor
A new instance of XmlPropertyDefs.
- #serialize(xml) ⇒ Object
Constructor Details
#initialize(property_defs) ⇒ XmlPropertyDefs
Returns a new instance of XmlPropertyDefs.
8 9 10 |
# File 'lib/archimate/file_formats/serializer/xml_property_defs.rb', line 8 def initialize(property_defs) @property_definitions = property_defs end |
Instance Method Details
#serialize(xml) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/archimate/file_formats/serializer/xml_property_defs.rb', line 12 def serialize(xml) return if @property_definitions.empty? xml.propertydefs do @property_definitions.each do |property_def| xml.propertydef( "identifier" => property_def.id, "name" => property_def.name, "type" => property_def.type ) end end end |