Class: Archimate::FileFormats::ModelExchangeFile::XmlPropertyDefinitions
- Inherits:
-
Object
- Object
- Archimate::FileFormats::ModelExchangeFile::XmlPropertyDefinitions
- Defined in:
- lib/archimate/file_formats/model_exchange_file/xml_property_definitions.rb
Overview
Property Definitions as defined in ArchiMate 3.0 Model Exchange XSDs
Instance Method Summary collapse
-
#initialize(property_defs) ⇒ XmlPropertyDefinitions
constructor
A new instance of XmlPropertyDefinitions.
- #serialize(xml) ⇒ Object
Constructor Details
#initialize(property_defs) ⇒ XmlPropertyDefinitions
Returns a new instance of XmlPropertyDefinitions.
8 9 10 |
# File 'lib/archimate/file_formats/model_exchange_file/xml_property_definitions.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 24 |
# File 'lib/archimate/file_formats/model_exchange_file/xml_property_definitions.rb', line 12 def serialize(xml) return if @property_definitions.empty? xml.propertyDefinitions do @property_definitions.each do |property_def| xml.propertyDefinition( "identifier" => property_def.id, "type" => property_def.value_type ) do ModelExchangeFile::XmlLangString.new(property_def.name, :name).serialize(xml) end end end end |