class Spirit::Render::Short
Renders short questions marked up in YAML as HTML
. @example
{ "format": "short", "question": "What is the most commonly used word in English?", "answer": "the" }
Public Instance Methods
valid?()
click to toggle source
Checks if the given yaml contains a valid MCQ. @return [Boolean] true iff the yaml contains a valid MCQ.
Calls superclass method
Spirit::Render::Problem#valid?
# File lib/spirit/render/templates/short.rb, line 20 def valid? super and not @yaml[ANSWER].nil? end