Class: Pry::Shell::IO::Pager

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

Defined Under Namespace

Classes: Output, Proxy

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(output) ⇒ Pager

rubocop:disable Lint/MissingSuper



33
34
35
# File 'lib/pry/shell/io/pager.rb', line 33

def initialize(output) # rubocop:disable Lint/MissingSuper
  @output = output
end

Instance Attribute Details

#outputObject (readonly)

Returns the value of attribute output.



31
32
33
# File 'lib/pry/shell/io/pager.rb', line 31

def output
  @output
end

Instance Method Details

#best_availableObject



37
38
39
40
41
42
43
# File 'lib/pry/shell/io/pager.rb', line 37

def best_available
  if !Pry::Pager::SystemPager.available? || Pry::Helpers::Platform.jruby?
    Pry::Pager::SimplePager.new(output)
  else
    Pry::Pager::SystemPager.new(output)
  end
end