class GithubToCanvasQuiz::Parser::Canvas::Answer::Matching
Public Instance Methods
parse()
click to toggle source
# File lib/github_to_canvas_quiz/parser/canvas/answer/matching.rb, line 8 def parse Model::Answer::Matching.new( title: title, text: data['text'], comments: comments, left: data['left'], right: data['right'] ) end
Private Instance Methods
comments()
click to toggle source
# File lib/github_to_canvas_quiz/parser/canvas/answer/matching.rb, line 24 def comments choose_text(data.fetch('comments', ''), data.fetch('comments_html', '')) end
title()
click to toggle source
# File lib/github_to_canvas_quiz/parser/canvas/answer/matching.rb, line 20 def title data['left'].empty? ? 'Incorrect' : 'Correct' end