diff options
author | Conrad Irwin <conrad.irwin@gmail.com> | 2014-04-29 00:03:15 -0700 |
---|---|---|
committer | Conrad Irwin <conrad.irwin@gmail.com> | 2014-04-29 00:03:15 -0700 |
commit | 259248b77ec6356525cad6274f9fb750849b4c13 (patch) | |
tree | 84036043fde194cfc8116b16e9390bcdd49dc88f /lib/pry/pager.rb | |
parent | c9affb2c166f2bb9d8f56014d3b8799a620d79db (diff) | |
download | pry-make-global-config-greppable.tar.gz |
Stop using compatibility aliases for Pry.configmake-global-config-greppable
Diffstat (limited to 'lib/pry/pager.rb')
-rw-r--r-- | lib/pry/pager.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/pry/pager.rb b/lib/pry/pager.rb index 3c01b44b..dae67f71 100644 --- a/lib/pry/pager.rb +++ b/lib/pry/pager.rb @@ -7,7 +7,7 @@ module Pry::Pager class StopPaging < StandardError end - # Send the given text through the best available pager (if `Pry.pager` is + # Send the given text through the best available pager (if `Pry.config.pager` is # enabled). # @param [String] text A piece of text to run through a pager. # @param [IO] output (`$stdout`) An object to send output to. @@ -36,7 +36,7 @@ module Pry::Pager # These requirements can be avoided by using `.with_pager` instead. # @param [#<<] output ($stdout) An object to send output to. def self.best_available(output) - if !Pry.pager + if !Pry.config.pager NullPager.new(output) elsif !SystemPager.available? || Pry::Helpers::BaseHelpers.jruby? SimplePager.new(output) @@ -46,7 +46,7 @@ module Pry::Pager end # `NullPager` is a "pager" that actually just prints all output as it comes - # in. Used when `Pry.pager` is false. + # in. Used when `Pry.config.pager` is false. class NullPager def initialize(out) @out = out @@ -94,7 +94,7 @@ module Pry::Pager if @tracker.page? @out.print "\n" - @out.print "\e[0m" if Pry.color + @out.print "\e[0m" if Pry.config.color @out.print "<page break> --- Press enter to continue " \ "( q<enter> to break ) --- <page break>\n" raise StopPaging if Readline.readline("").chomp == "q" |