Exception: Botiasloop::MaxIterationsExceeded

Inherits:
Error
  • Object
show all
Defined in:
lib/botiasloop.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(max_iterations) ⇒ MaxIterationsExceeded

Returns a new instance of MaxIterationsExceeded.



43
44
45
46
# File 'lib/botiasloop.rb', line 43

def initialize(max_iterations)
  @max_iterations = max_iterations
  super("I've reached my thinking limit (#{max_iterations} iterations). Please try a more specific question.")
end

Instance Attribute Details

#max_iterationsObject (readonly)

Returns the value of attribute max_iterations.



41
42
43
# File 'lib/botiasloop.rb', line 41

def max_iterations
  @max_iterations
end