Sha256: 5285b89434dce3c704dba4ade6e014b7e309d9f43934d2e3ce8b7d7c2e6b6c3e

Contents?: true

Size: 419 Bytes

Versions: 1

Compression:

Stored size: 419 Bytes

Contents

module MeducationSDK
  class View < Resource
    self.path = "/view"
    self.spi_type = "Item::View"

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

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

  class ViewMock < View
    extend Loquor::ResourceMock

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
meducation_sdk-1.6.1 lib/meducation_sdk/resources/view.rb