Class: ProformaXML::TaskFile

Inherits:
Base
  • Object
show all
Defined in:
lib/proformaxml/models/task_file.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from ProformaXML::Base

Instance Attribute Details

#binaryObject

Returns the value of attribute binary.



5
6
7
# File 'lib/proformaxml/models/task_file.rb', line 5

def binary
  @binary
end

#contentObject

Returns the value of attribute content.



5
6
7
# File 'lib/proformaxml/models/task_file.rb', line 5

def content
  @content
end

#filenameObject

Returns the value of attribute filename.



5
6
7
# File 'lib/proformaxml/models/task_file.rb', line 5

def filename
  @filename
end

#idObject

Returns the value of attribute id.



5
6
7
# File 'lib/proformaxml/models/task_file.rb', line 5

def id
  @id
end

#internal_descriptionObject

Returns the value of attribute internal_description.



5
6
7
# File 'lib/proformaxml/models/task_file.rb', line 5

def internal_description
  @internal_description
end

#mimetypeObject

Returns the value of attribute mimetype.



5
6
7
# File 'lib/proformaxml/models/task_file.rb', line 5

def mimetype
  @mimetype
end

#usage_by_lmsObject

Returns the value of attribute usage_by_lms.



5
6
7
# File 'lib/proformaxml/models/task_file.rb', line 5

def usage_by_lms
  @usage_by_lms
end

#used_by_graderObject

Returns the value of attribute used_by_grader.



5
6
7
# File 'lib/proformaxml/models/task_file.rb', line 5

def used_by_grader
  @used_by_grader
end

#visibleObject

Returns the value of attribute visible.



5
6
7
# File 'lib/proformaxml/models/task_file.rb', line 5

def visible
  @visible
end

Instance Method Details

#embed?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/proformaxml/models/task_file.rb', line 7

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