Sha256: 7fac4a768fcf979c8ec5abd55cfd4864da67d4d5c97fe7ef34ac9ceaa1d09de9

Contents?: true

Size: 420 Bytes

Versions: 9

Compression:

Stored size: 420 Bytes

Contents

module MeducationSDK
  class Comment < Resource
    self.path = "/comments"

    def item
      @item ||= class_for(item_type).find(item_id)
    end

    def user
      @user ||= User.find(user_id)
    end
  end

  class CommentMock < Comment
    extend Loquor::ResourceMock

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
meducation_sdk-1.5.7 lib/meducation_sdk/resources/comment.rb
meducation_sdk-1.5.6 lib/meducation_sdk/resources/comment.rb
meducation_sdk-1.5.5 lib/meducation_sdk/resources/comment.rb
meducation_sdk-1.5.4 lib/meducation_sdk/resources/comment.rb
meducation_sdk-1.5.3 lib/meducation_sdk/resources/comment.rb
meducation_sdk-1.5.2 lib/meducation_sdk/resources/comment.rb
meducation_sdk-1.5.1 lib/meducation_sdk/resources/comment.rb
meducation_sdk-1.5.0 lib/meducation_sdk/resources/comment.rb
meducation_sdk-1.4.4 lib/meducation_sdk/resources/comment.rb