Sha256: 2abe334d14c476e45ab809382a1a170adef68f743971a1586b82b05a79e27803

Contents?: true

Size: 303 Bytes

Versions: 9

Compression:

Stored size: 303 Bytes

Contents

# frozen_string_literal: true

module ProformaXML
  class TaskFile < Base
    attr_accessor :id, :content, :filename, :used_by_grader, :visible, :usage_by_lms, :binary, :internal_description, :mimetype

    def embed?
      (content&.length || 0) < MAX_EMBEDDED_FILE_SIZE_KB * (2**10)
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
proformaxml-1.5.2 lib/proformaxml/models/task_file.rb
proformaxml-1.5.1 lib/proformaxml/models/task_file.rb
proformaxml-1.5.0 lib/proformaxml/models/task_file.rb
proformaxml-1.4.0 lib/proformaxml/models/task_file.rb
proformaxml-1.3.0 lib/proformaxml/models/task_file.rb
proformaxml-1.2.0 lib/proformaxml/models/task_file.rb
proformaxml-1.1.0 lib/proformaxml/models/task_file.rb
proformaxml-1.0.0 lib/proformaxml/models/task_file.rb
proformaxml-0.10.0 lib/proformaxml/models/task_file.rb