class ACTV::Quiz

Public Class Methods

valid?(response) click to toggle source
# File lib/actv/quiz.rb, line 5
def self.valid? response
  ACTV::QuizValidator.new(response).valid?
end

Public Instance Methods

find_outcome_by_id(guid) click to toggle source
# File lib/actv/quiz.rb, line 17
def find_outcome_by_id guid
  outcomes.find do |outcome|
    outcome.assetGuid == guid
  end
end
outcomes() click to toggle source
# File lib/actv/quiz.rb, line 13
def outcomes
  @outcomes ||= child_assets_filtered_by_category 'outcome'
end
questions() click to toggle source
# File lib/actv/quiz.rb, line 9
def questions
  @questions ||= child_assets_filtered_by_category 'question'
end
thumbnail() click to toggle source
# File lib/actv/quiz.rb, line 23
def thumbnail
  @thumbnail ||= image_by_name 'desktop'
end