lib/triviacrack/parsers/game_parser.rb in triviacrack-0.3.2 vs lib/triviacrack/parsers/game_parser.rb in triviacrack-0.4.0
- old
+ new
@@ -29,9 +29,15 @@
q_data = q_data["question"]
q_data["type"] = raw_data["spins_data"]["spins"][0]["type"]
question = TriviaCrack::Parsers::QuestionParser.parse q_data
questions << question
end
+ if raw_data["spins_data"]["spins"][0]["type"] == "DUEL"
+ q_data = raw_data["spins_data"]["spins"][0]["tie_break_question"]
+ q_data["type"] = raw_data["spins_data"]["spins"][0]["type"]
+ question = TriviaCrack::Parsers::QuestionParser.parse q_data
+ questions << question
+ end
end
if raw_data["available_crowns"]
crowns = raw_data["available_crowns"].map { |c| c.downcase.to_sym }
else