Sha256: 8c745b4b99ba84f604d1234e452bfd0926f1f64b71cfeafa13af41eef5547435
Contents?: true
Size: 438 Bytes
Versions: 26
Compression:
Stored size: 438 Bytes
Contents
module Repla module REPL # Output controller class OutputController < Repla::Controller attr_accessor :view def initialize(view) @view = view end def parse_output(output) output = output.dup output.gsub!(/\x1b[^m]*m/, '') # Remove escape sequences output.chomp! @view.add_output(output) unless output.strip.empty? # Ignore empty lines end end end end
Version data entries
26 entries across 26 versions & 1 rubygems