Class: TTYString::Parser

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

Overview

Reads the text string a

Instance Method Summary collapse

Instance Method Details

#render(clear_style: true) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/tty_string/parser.rb', line 9

def render(clear_style: true)
  reset
  @clear_style = clear_style
  @renderer = Renderer.new
  read until eos?
  renderer.to_s
end