Class: Chamomile::Widgets::StatusBar

Inherits:
Object
  • Object
show all
Defined in:
lib/chamomile/frame.rb

Overview

Fixed bottom status bar.

Instance Method Summary collapse

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