Class: RatatuiRuby::Widgets::BarChart::Bar
- Inherits:
-
Object
- Object
- RatatuiRuby::Widgets::BarChart::Bar
- Includes:
- CoerceableWidget
- Defined in:
- lib/ratatui_ruby/widgets/bar_chart/bar.rb
Overview
Instance Method Summary collapse
-
#initialize(value:, label: nil, style: nil, value_style: nil, text_value: nil) ⇒ Bar
constructor
:attr_reader: text_value The text to display as the value (optional String, Text::Span, or Text::Line for rich styling).
Methods included from CoerceableWidget
Constructor Details
#initialize(value:, label: nil, style: nil, value_style: nil, text_value: nil) ⇒ Bar
:attr_reader: text_value The text to display as the value (optional String, Text::Span, or Text::Line for rich styling).
39 40 41 42 43 44 45 46 47 |
# File 'lib/ratatui_ruby/widgets/bar_chart/bar.rb', line 39 def initialize(value:, label: nil, style: nil, value_style: nil, text_value: nil) super( value: Integer(value), label:, style:, value_style:, text_value: ) end |