class GithubToCanvasQuiz::Parser::Canvas::Answer::TrueFalse
Public Instance Methods
parse()
click to toggle source
# File lib/github_to_canvas_quiz/parser/canvas/answer/true_false.rb, line 8 def parse Model::Answer::TrueFalse.new( title: title, text: data['text'], comments: comments ) end
Private Instance Methods
comments()
click to toggle source
# File lib/github_to_canvas_quiz/parser/canvas/answer/true_false.rb, line 22 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/true_false.rb, line 18 def title data.fetch('weight', 0).positive? ? 'Correct' : 'Incorrect' end