class MeducationSDK::ExternalResource
Public Class Methods
reimport_metadata(id)
click to toggle source
# File lib/meducation_sdk/resources/external_resource.rb, line 16 def self.reimport_metadata(id) new Loquor.post("#{path}/#{id}/reimport_metadata", {}) end
Public Instance Methods
created_by()
click to toggle source
# File lib/meducation_sdk/resources/external_resource.rb, line 5 def created_by @created_by ||= User.find(created_by_id) end
indexable_content()
click to toggle source
# File lib/meducation_sdk/resources/external_resource.rb, line 9 def indexable_content @indexable_content ||= begin object = IndexableContent.where(item_id: id, item_type: "ExternalResource").first object ? object.content : '' end end
item_mesh_headings()
click to toggle source
# File lib/meducation_sdk/resources/external_resource.rb, line 20 def item_mesh_headings @item_mesh_headings ||= begin @data['item_mesh_headings'].map do |imh| ItemMeshHeading.new(item_id: imh['item_id'], item_type: imh['item_type'], mesh_root: imh['mesh_root'], mesh_heading: imh['mesh_heading'], relevance: imh['relevance']) end end end