Class: Vedeu::Renderers::Text

Inherits:
Object
  • Object
show all
Includes:
Options
Defined in:
lib/vedeu/output/renderers/text.rb

Overview

Converts a grid of Views::Char objects into a stream of escape sequences and content.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Vedeu::Renderers::Text

Returns a new instance of Vedeu::Renderers::Text.

Parameters:

  • options (Hash) (defaults to: {})


16
17
18
# File 'lib/vedeu/output/renderers/text.rb', line 16

def initialize(options = {})
  @options = options || {}
end

Instance Attribute Details

#optionsHash<Symbol => void> (private) Originally defined in module Options

Combines the options provided at instantiation with the default values.

Returns:

  • (Hash<Symbol => void>)

Instance Method Details

#clearString

Render a cleared output.

Returns:

  • (String)


23
24
25
# File 'lib/vedeu/output/renderers/text.rb', line 23

def clear
  ''
end

#compress?Boolean Originally defined in module Options

Returns:

  • (Boolean)

#defaultsHash<Symbol => void> (private) Originally defined in module Options

The default values for a new instance of this class.

Returns:

  • (Hash<Symbol => void>)

#render(output) ⇒ String

Parameters:

Returns:

  • (String)


29
30
31
# File 'lib/vedeu/output/renderers/text.rb', line 29

def render(output)
  Vedeu::Output::Compressor.render(output)
end