Class: CML
- Inherits:
-
Object
- Object
- CML
- Defined in:
- lib/cml/cml.rb
Constant Summary collapse
- PADDING =
2
Instance Attribute Summary collapse
-
#text ⇒ Object
writeonly
Sets the attribute text.
-
#window ⇒ Object
Returns the value of attribute window.
Instance Method Summary collapse
-
#initialize(window, text) ⇒ CML
constructor
A new instance of CML.
- #render ⇒ Object
Constructor Details
#initialize(window, text) ⇒ CML
Returns a new instance of CML.
8 9 10 11 12 |
# File 'lib/cml/cml.rb', line 8 def initialize window, text @window = window @text = text @document = parse end |
Instance Attribute Details
#text=(value) ⇒ Object
Sets the attribute text
6 7 8 |
# File 'lib/cml/cml.rb', line 6 def text=(value) @text = value end |
#window ⇒ Object
Returns the value of attribute window.
5 6 7 |
# File 'lib/cml/cml.rb', line 5 def window @window end |
Instance Method Details
#render ⇒ Object
14 15 16 17 18 |
# File 'lib/cml/cml.rb', line 14 def render @window.clear render_loop @document @window.refresh end |