Class: Mumuki::Domain::Submission::Solution

Inherits:
PersistentSubmission show all
Defined in:
lib/mumuki/domain/submission/solution.rb

Constant Summary

Constants inherited from Base

Base::ATTRIBUTES

Instance Attribute Summary collapse

Attributes inherited from Base

#client_result

Instance Method Summary collapse

Methods inherited from PersistentSubmission

#save_submission!

Methods inherited from Base

#evaluate!, from_attributes, #id, mapping_attributes, #run!, #with_client_result

Instance Attribute Details

#contentObject

Returns the value of attribute content.



2
3
4
# File 'lib/mumuki/domain/submission/solution.rb', line 2

def content
  @content
end

Instance Method Details

#dry_run!(assignment, evaluation) ⇒ Object



4
5
6
# File 'lib/mumuki/domain/submission/solution.rb', line 4

def dry_run!(assignment, evaluation)
  evaluation.evaluate! assignment, self
end

#try_evaluate!(assignment) ⇒ Object



8
9
10
11
12
# File 'lib/mumuki/domain/submission/solution.rb', line 8

def try_evaluate!(assignment)
  assignment
    .run_tests!({client_result: client_result}.compact.merge(content: content))
    .except(:response_type)
end