Class: Mumuki::Domain::Submission::ConsoleSubmission

Inherits:
Base
  • Object
show all
Defined in:
lib/mumuki/domain/submission/console_submission.rb

Direct Known Subclasses

Query, Try

Constant Summary

Constants inherited from Base

Base::ATTRIBUTES

Instance Attribute Summary

Attributes inherited from Base

#client_result

Instance Method Summary collapse

Methods inherited from Base

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

Instance Method Details

#format_query_result!(results) ⇒ Object



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

def format_query_result!(results)
  results[:result] = I18n.t('console_submission.try_again') if results[:status].aborted?
  results[:status] = results[:status].to_submission_status
  results
end

#try_evaluate!(assignment) ⇒ Object



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

def try_evaluate!(assignment)
  format_query_result! try_evaluate_query!(assignment)
end