Sha256: b2dfaef8b8c17d480ecd4e7de273e04771b4382b4f160ade7e3303f96d5c2452

Contents?: true

Size: 538 Bytes

Versions: 6

Compression:

Stored size: 538 Bytes

Contents

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

    def owner
      @owner ||= "MeducationSDK::#{owner_type.gsub("::", "")}".constantize.find(owner_id)
    end

    def created_by
      @created_by ||= User.find(created_by_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!!"
    }
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
meducation_sdk-1.4.3 lib/meducation_sdk/resources/board.rb
meducation_sdk-1.4.2 lib/meducation_sdk/resources/board.rb
meducation_sdk-1.4.1 lib/meducation_sdk/resources/board.rb
meducation_sdk-1.4.0 lib/meducation_sdk/resources/board.rb
meducation_sdk-1.3.0 lib/meducation_sdk/resources/board.rb
meducation_sdk-1.2.6 lib/meducation_sdk/resources/board.rb