class FancyIrb::ErrorCapturer

Public Class Methods

new() click to toggle source
# File lib/fancy_irb/error_capturer.rb, line 5
def initialize
  @original_stdout, $stdout = $stdout, StringIO.new
  @fake_stdout = $stdout
end

Public Instance Methods

error_string() click to toggle source
# File lib/fancy_irb/error_capturer.rb, line 10
def error_string
  @fake_stdout.string
end
restore_original_stdout() click to toggle source
# File lib/fancy_irb/error_capturer.rb, line 14
def restore_original_stdout
  $stdout = @original_stdout
end