Class: Chamomile::Layout::StatusBar

Inherits:
Base
  • Object
show all
Defined in:
lib/chamomile/layout/status_bar.rb

Instance Method Summary collapse

Constructor Details

#initialize(content, color: "#666666") ⇒ StatusBar

Returns a new instance of StatusBar.



6
7
8
9
# File 'lib/chamomile/layout/status_bar.rb', line 6

def initialize(content, color: "#666666")
  @content = content.to_s
  @color   = color
end

Instance Method Details

#render(width:, height:) ⇒ Object



11
12
13
14
15
16
# File 'lib/chamomile/layout/status_bar.rb', line 11

def render(width:, height:)
  Chamomile::Style.new
    .foreground(@color)
    .width(width)
    .render(@content)
end