Class: Spirit::Render::Short
- Defined in:
- lib/spirit/render/templates/short.rb
Overview
Renders short questions marked up in YAML as HTML.
Constant Summary
Constants inherited from Problem
Problem::ANSWER, Problem::FORMAT, Problem::ID, Problem::KEYS, Problem::QUESTION
Instance Attribute Summary
Attributes inherited from Problem
Instance Method Summary collapse
-
#valid? ⇒ Boolean
Checks if the given yaml contains a valid MCQ.
Methods inherited from Problem
accessor, #answer, get_instance, #initialize, parse, #render
Methods inherited from Template
Constructor Details
This class inherits a constructor from Spirit::Render::Problem
Instance Method Details
#valid? ⇒ Boolean
Checks if the given yaml contains a valid MCQ.
20 21 22 |
# File 'lib/spirit/render/templates/short.rb', line 20 def valid? super and not @yaml[ANSWER].nil? end |