Class: RubyCode::Views::ResponseHandler::MaxIterations
- Inherits:
-
Object
- Object
- RubyCode::Views::ResponseHandler::MaxIterations
- Defined in:
- lib/rubycode/views/response_handler/max_iterations.rb
Overview
Builds max iterations warning box
Class Method Summary collapse
Class Method Details
.build(max_iterations:) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/rubycode/views/response_handler/max_iterations.rb', line 10 def self.build(max_iterations:) error_box = TTY::Box.frame( title: { top_left: " #{I18n.t("rubycode.response_handler.max_iterations.title")} " }, border: :thick, padding: 1, style: { fg: :yellow, border: { fg: :yellow } } ) do I18n.t("rubycode.response_handler.max_iterations.message", max: max_iterations) end "\n#{error_box}" end |