Sha256: d7edc48fc2d4d83f4d3565bf68b028d6cb06cfb8f890315c9d3fd92f31689b62
Contents?: true
Size: 683 Bytes
Versions: 20
Compression:
Stored size: 683 Bytes
Contents
module Solvable def submit_solution!(user, attributes={}) assignment, _ = find_assignment_and_submit! user, attributes[:content].to_mumuki_solution(language) assignment end def run_tests!(params) language.run_tests!( params.merge( test: test, locale: locale, expectations: expectations)) end end class NilClass def to_mumuki_solution(language) Solution.new end end class String def to_mumuki_solution(language) Solution.new content: normalize_whitespaces end end class Hash def to_mumuki_solution(language) language .directives_sections .join(self) .to_mumuki_solution(language) end end
Version data entries
20 entries across 20 versions & 1 rubygems