Sha256: f14a62ecca4ef1967f1d3b959c9d327452362f62cb17f0f4927b25f32b5dabad

Contents?: true

Size: 481 Bytes

Versions: 9

Compression:

Stored size: 481 Bytes

Contents

module MeducationSDK
  class BoardItem < Resource
    self.path = "/board_items"

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

    def board
      @board ||= Board.find(board_id)
    end

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

  end

  class BoardItemMock < BoardItem
    extend Loquor::ResourceMock

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


Version data entries

9 entries across 9 versions & 1 rubygems

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