Class: Metanorma::Collection::Config::Manifest
- Inherits:
-
Lutaml::Model::Serializable
- Object
- Lutaml::Model::Serializable
- Metanorma::Collection::Config::Manifest
show all
- Includes:
- Converters
- Defined in:
- lib/metanorma/collection/config/manifest.rb
Instance Method Summary
collapse
Methods included from Converters
#bibdata_from_xml, #bibdata_from_yaml, #bibdata_to_xml, #bibdata_to_yaml, #documents_from_xml, #documents_to_xml, #documents_to_xml?, #nop_to_yaml
Instance Method Details
#docref_from_yaml(model, value) ⇒ Object
87
88
89
|
# File 'lib/metanorma/collection/config/manifest.rb', line 87
def docref_from_yaml(model, value)
model.entry = Manifest.from_yaml(value.to_yaml)
end
|
#entry_from_xml(model, node) ⇒ Object
68
69
70
|
# File 'lib/metanorma/collection/config/manifest.rb', line 68
def entry_from_xml(model, node)
model.entry = Manifest.from_xml(node.node.to_xml)
end
|
#entry_to_xml(model, parent, doc) ⇒ Object
72
73
74
75
76
77
|
# File 'lib/metanorma/collection/config/manifest.rb', line 72
def entry_to_xml(model, parent, doc)
Array(model.entry).each do |e|
elem = e.to_xml
doc.add_element(parent, elem)
end
end
|
#fileref_from_yaml(model, value) ⇒ Object
83
84
85
|
# File 'lib/metanorma/collection/config/manifest.rb', line 83
def fileref_from_yaml(model, value)
model.file ||= value
end
|
#level_from_yaml(model, value) ⇒ Object
79
80
81
|
# File 'lib/metanorma/collection/config/manifest.rb', line 79
def level_from_yaml(model, value)
model.type ||= value
end
|