class Senkyoshi::FillInBlank

Public Instance Methods

iterate_xml(data) click to toggle source
Calls superclass method Senkyoshi::Question#iterate_xml
# File lib/senkyoshi/models/questions/fill_in_blank.rb, line 20
def iterate_xml(data)
  super
  if data.at("resprocessing")
    conditionvar = data.at("resprocessing").at("conditionvar")
  end
  # not all fill in the blank questions have answers(ie: surveys)
  if conditionvar
    answer = Answer.new(conditionvar.at("varequal").text)
    answer.fraction = @max_score
    @answers.push(answer)
  end
  self
end