Class: Pry::Pager::NullPager

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

Overview

‘NullPager` is a “pager” that actually just prints all output as it comes in. Used when `Pry.config.pager` is false.

Direct Known Subclasses

SimplePager, SystemPager

Instance Method Summary collapse

Constructor Details

#initialize(out) ⇒ NullPager

Returns a new instance of NullPager.



69
70
71
# File 'lib/pry/pager.rb', line 69

def initialize(out)
  @out = out
end

Instance Method Details

#closeObject



86
# File 'lib/pry/pager.rb', line 86

def close; end


77
78
79
# File 'lib/pry/pager.rb', line 77

def print(str)
  write str
end

#puts(str) ⇒ Object



73
74
75
# File 'lib/pry/pager.rb', line 73

def puts(str)
  print "#{str.chomp}\n"
end

#write(str) ⇒ Object



82
83
84
# File 'lib/pry/pager.rb', line 82

def write(str)
  @out.write str
end