Class: RETerm::Components::Label
- Inherits:
-
RETerm::Component
- Object
- RETerm::Component
- RETerm::Components::Label
- Defined in:
- lib/reterm/components/label.rb
Overview
Simply renders text to window
Instance Attribute Summary
Attributes inherited from RETerm::Component
Instance Method Summary collapse
- #draw! ⇒ Object
-
#initialize(args = {}) ⇒ Label
constructor
Initialize the Label component.
Methods inherited from RETerm::Component
#activatable?, #activate!, #colored?, #colors=, #finalize!
Constructor Details
#initialize(args = {}) ⇒ Label
Initialize the Label component
10 11 12 |
# File 'lib/reterm/components/label.rb', line 10 def initialize(args={}) @text = args[:text] || "" end |
Instance Method Details
#draw! ⇒ Object
14 15 16 17 |
# File 'lib/reterm/components/label.rb', line 14 def draw! window.mvaddstr(1, 1, @text) update_reterm end |