Sha256: e4d6e5dca01bf728caf57e83221e2cf426890a831ddcfeb017bc74c085cce833
Contents?: true
Size: 1007 Bytes
Versions: 5
Compression:
Stored size: 1007 Bytes
Contents
module Vedeu module Renderers # Converts a grid of {Vedeu::Views::Char} objects into a stream of # escape sequences and content suitable for a terminal. # class Terminal include Vedeu::Renderers::Options # Returns a new instance of Vedeu::Renderers::Terminal. # # @param options [Hash] # @return [Vedeu::Renderers::Terminal] def initialize(options = {}) @options = options || {} end # Render a cleared output. # # @return [String] def clear Vedeu::Terminal.clear end # @param output [Vedeu::Models::Page] # @return [Array<String>] def render(output) output = parse(output) Vedeu::Terminal.output(output) end private # @param output [Vedeu::Models::Page] # @return [Array<Array<Vedeu::Views::Char>>] def parse(output) Vedeu::Output::Compressor.render(output) end end # Terminal end # Renderers end # Vedeu
Version data entries
5 entries across 5 versions & 1 rubygems