Class: BetterErrors::REPL::Pry::Output
- Inherits:
-
Object
- Object
- BetterErrors::REPL::Pry::Output
- Defined in:
- lib/better_errors/repl/pry.rb
Instance Method Summary collapse
-
#initialize ⇒ Output
constructor
A new instance of Output.
- #print(*args) ⇒ Object
- #puts(*args) ⇒ Object
- #read_buffer ⇒ Object
- #tty? ⇒ Boolean
Constructor Details
#initialize ⇒ Output
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
#print(*args) ⇒ Object
34 35 36 |
# File 'lib/better_errors/repl/pry.rb', line 34 def print(*args) @buffer << args.join(' ') end |
#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_buffer ⇒ Object
28 29 30 31 32 |
# File 'lib/better_errors/repl/pry.rb', line 28 def read_buffer @buffer ensure @buffer = "" end |
#tty? ⇒ Boolean
24 25 26 |
# File 'lib/better_errors/repl/pry.rb', line 24 def tty? false end |