Class: CML

Inherits:
Object
  • Object
show all
Defined in:
lib/cml/cml.rb

Constant Summary collapse

PADDING =
2

Instance Attribute Summary collapse

Instance Method Summary collapse

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

Parameters:

  • value

    the value to set the attribute text to.



6
7
8
# File 'lib/cml/cml.rb', line 6

def text=(value)
  @text = value
end

#windowObject

Returns the value of attribute window.



5
6
7
# File 'lib/cml/cml.rb', line 5

def window
  @window
end

Instance Method Details

#renderObject



14
15
16
17
18
# File 'lib/cml/cml.rb', line 14

def render
  @window.clear
  render_loop @document
  @window.refresh
end