class MeducationSDK::CollectionTopic
Public Instance Methods
collection()
click to toggle source
# File lib/meducation_sdk/resources/collection_topic.rb, line 7 def collection @collection ||= Collection.find(collection_id) end
comments()
click to toggle source
# File lib/meducation_sdk/resources/collection_topic.rb, line 19 def comments @comments ||= Comment.where(id: comment_ids) end
item_mesh_headings()
click to toggle source
# File lib/meducation_sdk/resources/collection_topic.rb, line 23 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
users()
click to toggle source
# File lib/meducation_sdk/resources/collection_topic.rb, line 15 def users @users ||= User.where(id: authors.map(&:user_id)) end