Class: ProformaXML::Task
Instance Attribute Summary collapse
- 
  
    
      #description  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute description.
 - 
  
    
      #external_resources  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute external_resources.
 - 
  
    
      #files  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute files.
 - 
  
    
      #grading_hints  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute grading_hints.
 - 
  
    
      #internal_description  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute internal_description.
 - 
  
    
      #language  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute language.
 - 
  
    
      #meta_data  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute meta_data.
 - 
  
    
      #model_solutions  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute model_solutions.
 - 
  
    
      #parent_uuid  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute parent_uuid.
 - 
  
    
      #proglang  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute proglang.
 - 
  
    
      #submission_restrictions  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute submission_restrictions.
 - 
  
    
      #tests  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute tests.
 - 
  
    
      #title  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute title.
 - 
  
    
      #uuid  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute uuid.
 
Instance Method Summary collapse
- #all_files ⇒ Object
 - 
  
    
      #initialize(attributes = {})  ⇒ Task 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Task.
 
Constructor Details
#initialize(attributes = {}) ⇒ Task
Returns a new instance of Task.
      14 15 16 17 18 19 20  | 
    
      # File 'lib/proformaxml/models/task.rb', line 14 def initialize(attributes = {}) super self.files = [] if files.nil? self.tests = [] if tests.nil? self.model_solutions = [] if model_solutions.nil? self. = {} if .nil? end  | 
  
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
      11 12 13  | 
    
      # File 'lib/proformaxml/models/task.rb', line 11 def description @description end  | 
  
#external_resources ⇒ Object
Returns the value of attribute external_resources.
      11 12 13  | 
    
      # File 'lib/proformaxml/models/task.rb', line 11 def external_resources @external_resources end  | 
  
#files ⇒ Object
Returns the value of attribute files.
      11 12 13  | 
    
      # File 'lib/proformaxml/models/task.rb', line 11 def files @files end  | 
  
#grading_hints ⇒ Object
Returns the value of attribute grading_hints.
      11 12 13  | 
    
      # File 'lib/proformaxml/models/task.rb', line 11 def grading_hints @grading_hints end  | 
  
#internal_description ⇒ Object
Returns the value of attribute internal_description.
      11 12 13  | 
    
      # File 'lib/proformaxml/models/task.rb', line 11 def internal_description @internal_description end  | 
  
#language ⇒ Object
Returns the value of attribute language.
      11 12 13  | 
    
      # File 'lib/proformaxml/models/task.rb', line 11 def language @language end  | 
  
#meta_data ⇒ Object
Returns the value of attribute meta_data.
      11 12 13  | 
    
      # File 'lib/proformaxml/models/task.rb', line 11 def @meta_data end  | 
  
#model_solutions ⇒ Object
Returns the value of attribute model_solutions.
      11 12 13  | 
    
      # File 'lib/proformaxml/models/task.rb', line 11 def model_solutions @model_solutions end  | 
  
#parent_uuid ⇒ Object
Returns the value of attribute parent_uuid.
      11 12 13  | 
    
      # File 'lib/proformaxml/models/task.rb', line 11 def parent_uuid @parent_uuid end  | 
  
#proglang ⇒ Object
Returns the value of attribute proglang.
      11 12 13  | 
    
      # File 'lib/proformaxml/models/task.rb', line 11 def proglang @proglang end  | 
  
#submission_restrictions ⇒ Object
Returns the value of attribute submission_restrictions.
      11 12 13  | 
    
      # File 'lib/proformaxml/models/task.rb', line 11 def submission_restrictions @submission_restrictions end  | 
  
#tests ⇒ Object
Returns the value of attribute tests.
      11 12 13  | 
    
      # File 'lib/proformaxml/models/task.rb', line 11 def tests @tests end  | 
  
#title ⇒ Object
Returns the value of attribute title.
      11 12 13  | 
    
      # File 'lib/proformaxml/models/task.rb', line 11 def title @title end  | 
  
#uuid ⇒ Object
Returns the value of attribute uuid.
      11 12 13  | 
    
      # File 'lib/proformaxml/models/task.rb', line 11 def uuid @uuid end  | 
  
Instance Method Details
#all_files ⇒ Object
      22 23 24 25 26 27  | 
    
      # File 'lib/proformaxml/models/task.rb', line 22 def all_files task_files = files model_solution_files = model_solutions.map(&:files).filter(&:present?) test_files = tests.map(&:files).filter(&:present?) (task_files + model_solution_files + test_files).flatten.uniq end  |