$LOAD_PATH.unshift File.expand_path("../../lib", __dir__)
require "ratatui_ruby"
class VerifyQuickstartDsl
def run
RatatuiRuby.run do |tui|
loop do
view = tui.paragraph(
text: "Hello, Ratatui! Press 'q' to quit.",
alignment: :center,
block: tui.block(
title: "My Ruby TUI App",
title_alignment: :center,
borders: [:all],
border_style: { fg: "cyan" },
style: { fg: "white" }
)
)
tui.draw do |frame|
frame.render_widget(view, frame.area)
end
case tui.poll_event
in { type: :key, code: "q" }
break
else
end
end
end
end
end
VerifyQuickstartDsl.new.run if __FILE__ == $PROGRAM_NAME