Class: BetterErrors::REPL::Pry::Output

Inherits:
Object
  • Object
show all
Defined in:
lib/better_errors/repl/pry.rb

Instance Method Summary collapse

Constructor Details

#initializeOutput

Returns a new instance of Output.



14
15
16
# File 'lib/better_errors/repl/pry.rb', line 14

def initialize
  @buffer = ""
end

Instance Method Details

#puts(*args) ⇒ Object



18
19
20
21
22
# File 'lib/better_errors/repl/pry.rb', line 18

def puts(*args)
  args.each do |arg|
    @buffer << "#{arg.chomp}\n"
  end
end

#read_bufferObject



28
29
30
31
32
# File 'lib/better_errors/repl/pry.rb', line 28

def read_buffer
  @buffer
ensure
  @buffer = ""
end

#tty?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/better_errors/repl/pry.rb', line 24

def tty?
  false
end