Class: Vedeu::Renderers::Terminal
- Inherits:
-
Object
- Object
- Vedeu::Renderers::Terminal
- Includes:
- Options
- Defined in:
- lib/vedeu/output/renderers/terminal.rb
Overview
Converts a grid of Views::Char objects into a stream of escape sequences and content suitable for a terminal.
Instance Attribute Summary collapse
-
#options ⇒ Hash<Symbol => void>
included
from Options
private
Combines the options provided at instantiation with the default values.
Instance Method Summary collapse
-
#clear ⇒ String
Render a cleared output.
- #compress? ⇒ Boolean included from Options
-
#defaults ⇒ Hash<Symbol => void>
included
from Options
private
The default values for a new instance of this class.
-
#initialize(options = {}) ⇒ Vedeu::Renderers::Terminal
constructor
Returns a new instance of Vedeu::Renderers::Terminal.
- #parse(output) ⇒ Array<Array<Vedeu::Views::Char>> private
- #render(output) ⇒ Array<String>
Constructor Details
#initialize(options = {}) ⇒ Vedeu::Renderers::Terminal
Returns a new instance of Vedeu::Renderers::Terminal.
16 17 18 |
# File 'lib/vedeu/output/renderers/terminal.rb', line 16 def initialize( = {}) @options = || {} end |
Instance Attribute Details
#options ⇒ Hash<Symbol => void> (private) Originally defined in module Options
Combines the options provided at instantiation with the default values.
Instance Method Details
#clear ⇒ String
Render a cleared output.
23 24 25 |
# File 'lib/vedeu/output/renderers/terminal.rb', line 23 def clear Vedeu::Terminal.clear end |
#compress? ⇒ Boolean Originally defined in module Options
#defaults ⇒ Hash<Symbol => void> (private) Originally defined in module Options
The default values for a new instance of this class.
#parse(output) ⇒ Array<Array<Vedeu::Views::Char>> (private)
37 38 39 |
# File 'lib/vedeu/output/renderers/terminal.rb', line 37 def parse(output) Vedeu::Output::Compressor.render(output) end |