Sha256: c388ff7db449fe42fa6a4e1f1278ebff41a453c976b2fe5087ce96b10c316dec
Contents?: true
Size: 956 Bytes
Versions: 14
Compression:
Stored size: 956 Bytes
Contents
module Vedeu module Renderers # A renderer which returns the escape sequence for each character. class EscapeSequence # @param output [Array<Array<Vedeu::Char>>] # @return [String] def self.render(output) new(output).render end # @param output [Array<Array<Vedeu::Char>>] def initialize(output) @output = output end # @return [String] def render Vedeu.log(type: :debug, message: "#{self.class.name}:\n#{parsed}") parsed end protected # @!attribute [r] output # @return [Array<Array<Vedeu::Char>>] attr_reader :output private # Escapes the escape sequences. # # @return [String] def parsed @parsed ||= Array(output).flatten.map do |char| Esc.escape(char.to_s) + "\n" end.join end end # EscapeSequence end # Renderers end # Vedeu
Version data entries
14 entries across 14 versions & 1 rubygems