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



64
65
66
# File 'lib/pry/pager.rb', line 64

def initialize(out)
  @out = out
end

Instance Method Details

#closeObject



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

def close
end

#heightObject (private)



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

def height
  @height ||= Pry::Terminal.height!
end


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

def print(str)
  write str
end

#puts(str) ⇒ Object



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

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

#widthObject (private)



90
91
92
# File 'lib/pry/pager.rb', line 90

def width
  @width ||= Pry::Terminal.width!
end

#write(str) ⇒ Object



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

def write(str)
  @out.write str
end