Sha256: 5ff1ee77d72b7335a48d67b86367b54ff76f903bdb7e2dcf9e28b0facf9e4402

Contents?: true

Size: 438 Bytes

Versions: 2

Compression:

Stored size: 438 Bytes

Contents

module MeducationSDK
  class MediaFile < Loquor::Resource
    self.path = "/media_files"

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

    def comments
      @comments ||= ItemComment.where(item_id: id, item_type: "MediaFile")
    end
  end

  class MediaFileMock < MediaFile
    extend Loquor::ResourceMock

    self.attributes = {
      id: 1, 
      user_id: 1,
      title: "Abdominal Ultrasound Tutorial"
    }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
meducation_sdk-0.2.0 lib/meducation_sdk/resources/media_file.rb
meducation_sdk-0.1.0 lib/meducation_sdk/resources/media_file.rb