Sha256: 6eb95d98e0aaa4a8cb0f57510b6b3b1adda2dc2cfe99287f9841952b64bb5e88

Contents?: true

Size: 482 Bytes

Versions: 18

Compression:

Stored size: 482 Bytes

Contents

class Playground < QueriableChallenge
  validate :ensure_queriable_language

  name_model_as Exercise

  def save_query_submission!(assignment, submission)
    assignment.running!
    assignment.save_submission! submission
  end

  def save_query_results!(assignment)
    unless assignment.passed?
      assignment.passed!
      assignment.notify!
    end
  end

  private

  def ensure_queriable_language
    errors.add(:base, :language_not_queriable) unless queriable?
  end

end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
mumuki-domain-9.23.0 app/models/exercise/playground.rb
mumuki-domain-9.22.1 app/models/exercise/playground.rb
mumuki-domain-9.22.0 app/models/exercise/playground.rb
mumuki-domain-9.21.0 app/models/exercise/playground.rb
mumuki-domain-9.20.0 app/models/exercise/playground.rb
mumuki-domain-9.19.0 app/models/exercise/playground.rb
mumuki-domain-9.18.0 app/models/exercise/playground.rb
mumuki-domain-9.17.0 app/models/exercise/playground.rb
mumuki-domain-9.16.0 app/models/exercise/playground.rb
mumuki-domain-9.15.0 app/models/exercise/playground.rb
mumuki-domain-9.14.1 app/models/exercise/playground.rb
mumuki-domain-9.14.0 app/models/exercise/playground.rb
mumuki-domain-9.13.1 app/models/exercise/playground.rb
mumuki-domain-9.13.0 app/models/exercise/playground.rb
mumuki-domain-9.12.0 app/models/exercise/playground.rb
mumuki-domain-9.11.0 app/models/exercise/playground.rb
mumuki-domain-9.10.0 app/models/exercise/playground.rb
mumuki-domain-9.9.0 app/models/exercise/playground.rb