class Senkyoshi::EitherOr
Constants
- EITHER_OR
Public Class Methods
new()
click to toggle source
Calls superclass method
Senkyoshi::Question::new
# File lib/senkyoshi/models/questions/either_or.rb, line 31 def initialize super @original_text = "" end
Public Instance Methods
iterate_xml(data)
click to toggle source
Calls superclass method
Senkyoshi::Question#iterate_xml
# File lib/senkyoshi/models/questions/either_or.rb, line 36 def iterate_xml(data) super set_answers(data.at("resprocessing")) data.at("flow_label").children.each do |response| answer_text = response.at("mattext").text answer = Answer.new(EITHER_OR[answer_text]) answer.fraction = get_fraction(answer_text) @answers.push(answer) end self end