Module: Cura::Termbox::Component::Base
- Defined in:
- lib/cura/termbox/component/base.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#background ⇒ Color
Get the background color of this component.
-
#foreground ⇒ Color
Get the foreground color of this component.
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
#background ⇒ Color
Get the background color of this component.
22 23 24 |
# File 'lib/cura/termbox/component/base.rb', line 22 def background get_or_inherit_color(:background, Cura::Color.black) end |
#foreground ⇒ Color
Get the foreground color of this component.
15 16 17 |
# File 'lib/cura/termbox/component/base.rb', line 15 def foreground get_or_inherit_color(:foreground, Cura::Color.white) end |