Class: Chamomile::Widgets::StatusBar
- Inherits:
-
Object
- Object
- Chamomile::Widgets::StatusBar
- Defined in:
- lib/chamomile/frame.rb
Overview
Fixed bottom status bar.
Instance Method Summary collapse
-
#initialize(content: "") ⇒ StatusBar
constructor
A new instance of StatusBar.
- #render(width: 80, height: 1) ⇒ Object
Constructor Details
#initialize(content: "") ⇒ StatusBar
Returns a new instance of StatusBar.
277 278 279 |
# File 'lib/chamomile/frame.rb', line 277 def initialize(content: "") @content = content end |
Instance Method Details
#render(width: 80, height: 1) ⇒ Object
281 282 283 284 |
# File 'lib/chamomile/frame.rb', line 281 def render(width: 80, height: 1) line = @content.length > width ? @content[0, width] : @content line end |