Module: Omml::Parser
Instance Method Summary collapse
Instance Method Details
#parse(input, context: Omml::Configuration.context_id) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/omml/parser.rb', line 7 def parse(input, context: Omml::Configuration.context_id) context_id = prepare_context(context) document = parse_document(input) root_class = Omml::Configuration.resolve_root_class(document, context: context_id) root_class.of_xml(document, register: context_id) end |
#root_name(input) ⇒ Object
15 16 17 |
# File 'lib/omml/parser.rb', line 15 def root_name(input) Omml::Configuration.root_name_from_document(parse_document(input)) end |