Sha256: d5961ae0c0bfc3b83fc45ead89c53a3e04b4068535f1535b59fcb21ad73eee30

Contents?: true

Size: 604 Bytes

Versions: 28

Compression:

Stored size: 604 Bytes

Contents

module MeducationSDK
  class Board < Resource
    self.path = "/boards"

    def owner
      @owner ||= sdk_class_for(owner_type).find(owner_id)
    end

    def created_by
      @created_by ||= User.find(created_by_id)
    end

    def items
      @items ||= BoardItem.where(board_id: self.id)
    end
  end

  class BoardMock < Board
    extend Loquor::ResourceMock

    self.attributes = {
      id: 1,
      created_by_id: 8,
      owner_id: 5, owner_type: "Group",
      name: "Greatest Board",
      description: "This is the greatest board ever!!",
      created_at: "2013-04-20"
    }
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

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