Class: Ea::Sources::Xmi::MetadataBuilder
- Inherits:
-
Object
- Object
- Ea::Sources::Xmi::MetadataBuilder
- Defined in:
- lib/ea/sources/xmi/metadata_builder.rb
Instance Attribute Summary collapse
-
#root ⇒ Object
readonly
Returns the value of attribute root.
-
#xmi_path ⇒ Object
readonly
Returns the value of attribute xmi_path.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(root, xmi_path) ⇒ MetadataBuilder
constructor
A new instance of MetadataBuilder.
Constructor Details
#initialize(root, xmi_path) ⇒ MetadataBuilder
Returns a new instance of MetadataBuilder.
9 10 11 12 |
# File 'lib/ea/sources/xmi/metadata_builder.rb', line 9 def initialize(root, xmi_path) @root = root @xmi_path = xmi_path end |
Instance Attribute Details
#root ⇒ Object (readonly)
Returns the value of attribute root.
7 8 9 |
# File 'lib/ea/sources/xmi/metadata_builder.rb', line 7 def root @root end |
#xmi_path ⇒ Object (readonly)
Returns the value of attribute xmi_path.
7 8 9 |
# File 'lib/ea/sources/xmi/metadata_builder.rb', line 7 def xmi_path @xmi_path end |
Instance Method Details
#build ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/ea/sources/xmi/metadata_builder.rb', line 14 def build model = root.model documentation = root.documentation Ea::Model::Metadata.new( id: "metadata", title: model&.name, version: documentation&.exporter_version, author: documentation&.exporter, created_date: nil, modified_date: documentation&.&.first&.iso8601, source_format: "xmi", source_tool: documentation&.exporter, source_path: xmi_path ) end |