Class: Metanorma::UnDocument::Root
- Inherits:
-
Lutaml::Model::Serializable
- Object
- Lutaml::Model::Serializable
- Metanorma::UnDocument::Root
- Includes:
- StandardDocument::RootAttributes
- Defined in:
- lib/metanorma/un_document/root.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#grammar_errors ⇒ Object
Validates the parsed document against the UN grammar restrictions the model does not enforce structurally (currently: the UN TextElement inline subset).
Methods included from StandardDocument::RootAttributes
Class Method Details
.lutaml_default_register ⇒ Object
8 9 10 |
# File 'lib/metanorma/un_document/root.rb', line 8 def self.lutaml_default_register :un_document end |
Instance Method Details
#grammar_errors ⇒ Object
Validates the parsed document against the UN grammar restrictions the model does not enforce structurally (currently: the UN TextElement inline subset). Walks the model graph and returns an array of error strings; empty when the document is valid.
25 26 27 |
# File 'lib/metanorma/un_document/root.rb', line 25 def grammar_errors Metanorma::UnDocument::UnTextElement.validate(self) end |