Sha256: cf11f5867e6443f643194fc6a126d2b6a5b51ee273d016df28fe787c30d2d953

Contents?: true

Size: 377 Bytes

Versions: 15

Compression:

Stored size: 377 Bytes

Contents

module WebConsole::REPL
  class OutputController < WebConsole::Controller

    attr_accessor :view
    def initialize
    end

    def parse_output(output)
      output = output.dup
      output.gsub!(/\x1b[^m]*m/, "") # Remove escape sequences
      output.chomp!
      if !output.strip.empty? # Ignore empty lines
        @view.add_output(output)
      end
    end

  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
webconsole-0.1.18 lib/webconsole/repl/lib/output_controller.rb
webconsole-0.1.17 lib/webconsole/repl/lib/output_controller.rb
webconsole-0.1.16 lib/webconsole/repl/lib/output_controller.rb
webconsole-0.1.15 lib/webconsole/repl/lib/output_controller.rb
webconsole-0.1.14 lib/webconsole/repl/lib/output_controller.rb
webconsole-0.1.13 lib/webconsole/repl/lib/output_controller.rb
webconsole-0.1.12 lib/webconsole/repl/lib/output_controller.rb
webconsole-0.1.11 lib/webconsole/repl/lib/output_controller.rb
webconsole-0.1.10 lib/webconsole/repl/lib/output_controller.rb
webconsole-0.1.5 lib/webconsole/repl/lib/output_controller.rb
webconsole-0.1.4 lib/webconsole/repl/lib/output_controller.rb
webconsole-0.1.3 lib/webconsole/repl/lib/output_controller.rb
webconsole-0.1.2 lib/webconsole/repl/lib/output_controller.rb
webconsole-0.1.1 lib/webconsole/repl/lib/output_controller.rb
webconsole-0.1.0 lib/webconsole/repl/lib/output_controller.rb