Class: Mumukit::Sync::Inflator::Choice

Inherits:
Exercise
  • Object
show all
Defined in:
lib/mumukit/sync/inflator/choice.rb

Direct Known Subclasses

MultipleChoice, SingleChoice

Instance Method Summary collapse

Methods inherited from Exercise

#inflate!

Instance Method Details

#inflate_exercise!(exercise_h, language_name, guide_h) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/mumukit/sync/inflator/choice.rb', line 3

def inflate_exercise!(exercise_h, language_name, guide_h)
  return unless language_name == 'text'
  return unless exercise_h[:editor] == editor_type
  return if exercise_h[:test]

  exercise_h[:test] = choices_to_test(exercise_h[:choices])
end