Sha256: 10879cb7b1e2b2fc64d9a28710fd6517dc13d89fe1c7e82d682e483cfa2b77cf

Contents?: true

Size: 425 Bytes

Versions: 28

Compression:

Stored size: 425 Bytes

Contents

module MeducationSDK
  class DashboardItem < Resource
    self.path = "/dashboard_items"

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

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

  class DashboardItemMock < DashboardItem
    extend Loquor::ResourceMock

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

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
meducation_sdk-2.2.2 lib/meducation_sdk/resources/dashboard_item.rb
meducation_sdk-2.2.1 lib/meducation_sdk/resources/dashboard_item.rb
meducation_sdk-2.2.0 lib/meducation_sdk/resources/dashboard_item.rb
meducation_sdk-2.1.4 lib/meducation_sdk/resources/dashboard_item.rb
meducation_sdk-2.1.3 lib/meducation_sdk/resources/dashboard_item.rb
meducation_sdk-2.1.2 lib/meducation_sdk/resources/dashboard_item.rb
meducation_sdk-2.1.1 lib/meducation_sdk/resources/dashboard_item.rb
meducation_sdk-2.1.0 lib/meducation_sdk/resources/dashboard_item.rb
meducation_sdk-2.0.5 lib/meducation_sdk/resources/dashboard_item.rb
meducation_sdk-2.0.4 lib/meducation_sdk/resources/dashboard_item.rb
meducation_sdk-2.0.3 lib/meducation_sdk/resources/dashboard_item.rb
meducation_sdk-2.0.2 lib/meducation_sdk/resources/dashboard_item.rb
meducation_sdk-2.0.1 lib/meducation_sdk/resources/dashboard_item.rb
meducation_sdk-2.0.0 lib/meducation_sdk/resources/dashboard_item.rb
meducation_sdk-1.6.16 lib/meducation_sdk/resources/dashboard_item.rb
meducation_sdk-1.6.15 lib/meducation_sdk/resources/dashboard_item.rb
meducation_sdk-1.6.14 lib/meducation_sdk/resources/dashboard_item.rb
meducation_sdk-1.6.13 lib/meducation_sdk/resources/dashboard_item.rb
meducation_sdk-1.6.12 lib/meducation_sdk/resources/dashboard_item.rb
meducation_sdk-1.6.11 lib/meducation_sdk/resources/dashboard_item.rb