Sha256: 28472ebce232cf9bc0bb2f0398e874554a47addfc9671b97c9cc4b6597cfdac0

Contents?: true

Size: 900 Bytes

Versions: 14

Compression:

Stored size: 900 Bytes

Contents

module Vedeu

  module Renderers

    # Converts a grid of {Vedeu::Char} objects into a stream of escape sequences
    # and content suitable for a terminal.
    #
    class Terminal

      include Vedeu::RendererOptions

      # Returns a new instance of Vedeu::Renderers::Terminal.
      #
      # @param options [Hash]
      # @return [Vedeu::Renderers::Terminal]
      def initialize(options = {})
        @options = options || {}
      end

      # @param output [Array<Array<Vedeu::Char>>]
      # @return [Array<String>]
      def render(output)
        Vedeu::Terminal.output(parsed(output))
      end

      private

      # @param output [Array<Array<Vedeu::Char>>]
      # @return [Array<Array<Vedeu::Char>>]
      def parsed(output)
        Vedeu.timer('Compression') do
          Vedeu::Compressor.render(output)
        end
      end

    end # Terminal

  end # Renderers

end # Vedeu

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
vedeu-0.5.4 lib/vedeu/output/renderers/terminal.rb
vedeu-0.5.3 lib/vedeu/output/renderers/terminal.rb
vedeu-0.5.2 lib/vedeu/output/renderers/terminal.rb
vedeu-0.5.1 lib/vedeu/output/renderers/terminal.rb
vedeu-0.5.0 lib/vedeu/output/renderers/terminal.rb
vedeu-0.4.65 lib/vedeu/output/renderers/terminal.rb
vedeu-0.4.64 lib/vedeu/output/renderers/terminal.rb
vedeu-0.4.63 lib/vedeu/output/renderers/terminal.rb
vedeu-0.4.62 lib/vedeu/output/renderers/terminal.rb
vedeu-0.4.61 lib/vedeu/output/renderers/terminal.rb
vedeu-0.4.60 lib/vedeu/output/renderers/terminal.rb
vedeu-0.4.59 lib/vedeu/output/renderers/terminal.rb
vedeu-0.4.58 lib/vedeu/output/renderers/terminal.rb
vedeu-0.4.57 lib/vedeu/output/renderers/terminal.rb