Module: Cura::Termbox::Component::Base

Defined in:
lib/cura/termbox/component/base.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



5
6
7
8
9
10
# File 'lib/cura/termbox/component/base.rb', line 5

def self.included(base)
  base.instance_eval do
    remove_method(:foreground)
    remove_method(:background)
  end
end

Instance Method Details

#backgroundColor

Get the background color of this component.

Returns:

  • (Color)


22
23
24
# File 'lib/cura/termbox/component/base.rb', line 22

def background
  get_or_inherit_color(:background, Cura::Color.black)
end

#foregroundColor

Get the foreground color of this component.

Returns:

  • (Color)


15
16
17
# File 'lib/cura/termbox/component/base.rb', line 15

def foreground
  get_or_inherit_color(:foreground, Cura::Color.white)
end