Sha256: dbf9f617957232ec96a0527958c3ed47f8bde00e4c522cfc42e7c08bd60f6264

Contents?: true

Size: 453 Bytes

Versions: 25

Compression:

Stored size: 453 Bytes

Contents

module MeducationSDK
  class View < Resource
    self.path = "/views"
    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,
      ip_address: '192.168.0.1',
      item_type: "MediaFile"
    }
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

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