Module: Mumuki::Domain::Status::Submission

Includes:
Mumuki::Domain::Status
Included in:
Aborted, Errored, Failed, ManualEvaluationPending, Passed, PassedWithWarnings, Pending, Running, Skipped
Defined in:
lib/mumuki/domain/status/submission/submission.rb,
lib/mumuki/domain/status/submission/submission.rb

Defined Under Namespace

Modules: Aborted, Errored, Failed, ManualEvaluationPending, Passed, PassedWithWarnings, Pending, Running, Skipped

Constant Summary collapse

STATUSES =
[Pending, Running, Passed, Failed, Errored, Aborted, PassedWithWarnings, ManualEvaluationPending, Skipped]

Instance Method Summary collapse

Methods included from Mumuki::Domain::Status

#==, #as_json, #dup, #to_i, #to_s, #to_sym

Instance Method Details

#completed?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/mumuki/domain/status/submission/submission.rb', line 34

def completed?
  solved?
end

#exp_givenObject



46
47
48
# File 'lib/mumuki/domain/status/submission/submission.rb', line 46

def exp_given
  0
end

#groupObject



22
23
24
# File 'lib/mumuki/domain/status/submission/submission.rb', line 22

def group
  self
end

#iconizeObject



30
31
32
# File 'lib/mumuki/domain/status/submission/submission.rb', line 30

def iconize
  group.iconize
end

#improved_by?(status) ⇒ Boolean

Returns:

  • (Boolean)


42
43
44
# File 'lib/mumuki/domain/status/submission/submission.rb', line 42

def improved_by?(status)
  self.exp_given < status.exp_given
end

#should_retry?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/mumuki/domain/status/submission/submission.rb', line 26

def should_retry?
  false
end

#solved?Boolean

Returns:

  • (Boolean)


38
39
40
# File 'lib/mumuki/domain/status/submission/submission.rb', line 38

def solved?
  passed? || skipped?
end