$LOAD_PATH.unshift File.expand_path("../../lib", __dir__)
require "ratatui_ruby"
class VerifyReadmeUsage
def run
RatatuiRuby.run do |tui|
loop do
tui.draw do |frame|
frame.render_widget(
tui.paragraph(
text: "Hello, Ratatui! Press 'q' to quit.",
alignment: :center,
block: tui.block(
title: "My Ruby TUI App",
borders: [:all],
border_color: "cyan"
)
),
frame.area
)
end
event = tui.poll_event
break if event == "q" || event == :ctrl_c
end
end
end
end
VerifyReadmeUsage.new.run if __FILE__ == $PROGRAM_NAME