Class: TTYString::Parser

Inherits:
StringScanner
  • Object
show all
Defined in:
lib/tty_string/parser.rb

Overview

Reads the text string a

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#clear_styleObject

Returns the value of attribute clear_style.



12
13
14
# File 'lib/tty_string/parser.rb', line 12

def clear_style
  @clear_style
end

#screenObject (readonly)

Returns the value of attribute screen.



13
14
15
# File 'lib/tty_string/parser.rb', line 13

def screen
  @screen
end

Instance Method Details

#cursorObject



22
23
24
# File 'lib/tty_string/parser.rb', line 22

def cursor
  screen.cursor
end

#renderObject



15
16
17
18
19
20
# File 'lib/tty_string/parser.rb', line 15

def render
  reset
  @screen = Screen.new
  read until eos?
  screen.to_s
end