Class: Senkyoshi::Link

Inherits:
FileResource show all
Defined in:
lib/senkyoshi/models/link.rb

Overview

Represents a link between Blackboard resources.

Instance Attribute Summary

Attributes inherited from FileResource

#id

Class Method Summary collapse

Methods inherited from FileResource

#create_module, from, #initialize, #iterate_xml

Methods inherited from Resource

#_find_directories, #_fix_path, #_matches_directory_xid?, #_search_and_replace, #cleanup, #fix_html, #matches_xid?, #strip_xid

Constructor Details

This class inherits a constructor from Senkyoshi::FileResource

Class Method Details

.get_pre_data(xml_data, _file) ⇒ Object



21
22
23
24
25
26
27
28
# File 'lib/senkyoshi/models/link.rb', line 21

def self.get_pre_data(xml_data, _file)
  {
    referrer: xml_data.children.at("REFERRER").attributes["id"].value,
    referred_to: xml_data.children.at("REFERREDTO").attributes["id"].value,
    referred_to_title: xml_data.children.at("TITLE").
      attributes["value"].value,
  }
end