Class: Qti::Models::MetaData
Instance Attribute Summary
Attributes inherited from Base
#doc, #manifest, #package_root, #path, #resource
Instance Method Summary collapse
-
#initialize(node) ⇒ MetaData
constructor
A new instance of MetaData.
- #taxonpaths ⇒ Object
Methods inherited from Base
#css_with_single_check, from_path!, #parse_html, #parse_xml, #preprocess_xml_doc, #raise_unsupported, #remap_href_path, #sanitize_content!, #xpath_with_single_check
Constructor Details
#initialize(node) ⇒ MetaData
Returns a new instance of MetaData.
4 5 6 |
# File 'lib/qti/models/metadata.rb', line 4 def initialize(node) @node = node end |
Instance Method Details
#taxonpaths ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/qti/models/metadata.rb', line 8 def taxonpaths return unless lom hier = Hash.new { |h, k| h[k] = [] } lom.xpath('imsmd:classification/imsmd:taxonPath').each do |tp| entry = taxonpath_entry(tp) hier[entry[:source]] = entry[:taxonpath] end hier end |