Sha256: 729a5e006a88c9c27b3671f8c0b3629c3591943048a1346163278c4a17d57456

Contents?: true

Size: 590 Bytes

Versions: 5

Compression:

Stored size: 590 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

    module State
      def self.uploaded; 1 end
      def self.processing; 2 end
      def self.available; 3 end
      def self.redacted; 4 end
    end
  end

  class MediaFileMock < MediaFile
    extend Loquor::ResourceMock

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
meducation_sdk-0.3.4 lib/meducation_sdk/resources/media_file.rb
meducation_sdk-0.3.3 lib/meducation_sdk/resources/media_file.rb
meducation_sdk-0.3.2 lib/meducation_sdk/resources/media_file.rb
meducation_sdk-0.3.1 lib/meducation_sdk/resources/media_file.rb
meducation_sdk-0.3.0 lib/meducation_sdk/resources/media_file.rb