Sha256: 3e1d83ba73503f5d110e2af84753aab590d5d98a8986cc5dafce8f4c59c63053

Contents?: true

Size: 409 Bytes

Versions: 7

Compression:

Stored size: 409 Bytes

Contents

module MeducationSDK
  class ItemComment < Loquor::Resource
    self.path = "/item_comments"

    def item
      @item ||= "MeducationSDK::#{item_type}".constantize.find(item_id)
    end
  end

  class ItemCommentMock < ItemComment
    extend Loquor::ResourceMock

    self.attributes = {
      id: 1,
      user_id: 8,
      item_id: 5, item_type: "MediaFile",
      parsed_content: "Foobar"
    }
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
meducation_sdk-0.3.4 lib/meducation_sdk/resources/item_comment.rb
meducation_sdk-0.3.3 lib/meducation_sdk/resources/item_comment.rb
meducation_sdk-0.3.2 lib/meducation_sdk/resources/item_comment.rb
meducation_sdk-0.3.1 lib/meducation_sdk/resources/item_comment.rb
meducation_sdk-0.3.0 lib/meducation_sdk/resources/item_comment.rb
meducation_sdk-0.2.0 lib/meducation_sdk/resources/item_comment.rb
meducation_sdk-0.1.0 lib/meducation_sdk/resources/item_comment.rb