Class: Vedeu::Renderers::Terminal Private
- Inherits:
-
Object
- Object
- Vedeu::Renderers::Terminal
- Includes:
- Options
- Defined in:
- lib/vedeu/renderers/terminal.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Converts a grid of Cells::Char objects into a stream of escape sequences and content suitable for a terminal.
Instance Attribute Summary
Attributes included from Options
Instance Method Summary collapse
-
#clear ⇒ String
private
Render a cleared output.
-
#content ⇒ String
private
private
Returns the output in a compressed form if the :compression option is true.
- #writable_data ⇒ String private private
-
#write ⇒ String
private
Render the output (either content or clearing) to the console.
Methods included from Options
#compression, #compression?, #default_template, #defaults, #end_row_tag, #end_tag, #filename, #initialize, #output, #output?, #render, #start_row_tag, #start_tag, #template, #timestamp, #timestamp?, #write_file, #write_file?
Methods included from Common
#absent?, #array?, #boolean, #boolean?, #empty_value?, #escape?, #falsy?, #hash?, #line_model?, #numeric?, #positionable?, #present?, #snake_case, #stream_model?, #string?, #symbol?, #truthy?, #view_model?
Instance Method Details
#clear ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Render a cleared output.
19 20 21 22 23 |
# File 'lib/vedeu/renderers/terminal.rb', line 19 def clear Vedeu::Terminal.clear render('') end |
#content ⇒ String (private)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the output in a compressed form if the :compression option is true.
38 39 40 |
# File 'lib/vedeu/renderers/terminal.rb', line 38 def content compression end |
#writable_data ⇒ String (private)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
43 44 45 46 47 |
# File 'lib/vedeu/renderers/terminal.rb', line 43 def writable_data return write_file if write_file? content end |
#write ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Render the output (either content or clearing) to the console.
28 29 30 |
# File 'lib/vedeu/renderers/terminal.rb', line 28 def write Vedeu.direct_write(writable_data) end |