Class: StageBase

Inherits:
Object
  • Object
show all
Defined in:
lib/asker/ai/problem/stage_base.rb

Direct Known Subclasses

StageAnswers, StageSteps

Instance Method Summary collapse

Constructor Details

#initialize(problem) ⇒ StageBase

Returns a new instance of StageBase.



5
6
7
8
9
10
# File 'lib/asker/ai/problem/stage_base.rb', line 5

def initialize(problem)
  @problem = problem
  @customs = get_customs(@problem)
  @customizer = Customizer.new(@problem)
  @counter = @problem.questions.size
end

Instance Method Details

#counterObject



12
13
14
# File 'lib/asker/ai/problem/stage_base.rb', line 12

def counter
  @counter += 1
end

#customizeObject



16
17
18
# File 'lib/asker/ai/problem/stage_base.rb', line 16

def customize(...)
  @customizer.call(...)
end