Method: ProblemAI#call

Defined in:
lib/asker/ai/problem/problem_ai.rb

#call(problem) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/asker/ai/problem/problem_ai.rb', line 9

def call(problem)
  @problem = problem

  questions = StageAnswers.new(@problem).make_questions
  @problem.stats[:answer] = questions.size
  @problem.questions = questions

  questions = StageSteps.new(@problem).make_questions
  @problem.stats[:steps] = questions.size
  @problem.questions += questions

  @problem
end