Class: Metanorma::UnDocument::Root

Inherits:
Lutaml::Model::Serializable
  • Object
show all
Includes:
StandardDocument::RootAttributes
Defined in:
lib/metanorma/un_document/root.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from StandardDocument::RootAttributes

included

Class Method Details

.lutaml_default_registerObject



8
9
10
# File 'lib/metanorma/un_document/root.rb', line 8

def self.lutaml_default_register
  :un_document
end

Instance Method Details

#grammar_errorsObject

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