class RatatuiRuby::Paragraph
A widget that displays a block of text.
Public Class Methods
Source
# File lib/ratatui_ruby/schema/paragraph.rb, line 20 def initialize(text:, style: Style.default, block: nil, wrap: false, align: :left) super end
- text
-
the text to display.
- style
-
the style to apply.
- block
-
the block to wrap the paragraph.
- wrap
-
whether to wrap text at width.
- align
-
alignment (:left, :center, :right).
Calls superclass method
Source
# File lib/ratatui_ruby/schema/paragraph.rb, line 32 def self.new(text:, style: nil, fg: nil, bg: nil, block: nil, wrap: false, align: :left) style ||= Style.new(fg:, bg:) super(text:, style:, block:, wrap:, align:) end
Support for legacy fg/bg arguments.
- text
-
the text to display.
- style
-
the style to apply.
- fg
-
legacy foreground color.
- bg
-
legacy background color.
- block
-
the block to wrap the paragraph.
- wrap
-
whether to wrap text at width.
- align
-
alignment (:left, :center, :right).
Calls superclass method