Class: TTY::Pager::NullPager
Constant Summary
Constants inherited from Abstract
Abstract::UndefinedMethodError
Instance Method Summary collapse
-
#close ⇒ Object
Do nothing, always return success.
-
#puts(text) ⇒ Object
Pass output directly to stdout.
-
#write(text) ⇒ Object
(also: #<<)
Pass output directly to stdout.
Methods inherited from Abstract
#enabled?, #initialize, page, #page, #try_write
Constructor Details
This class inherits a constructor from TTY::Pager::Abstract
Instance Method Details
#close ⇒ Object
Do nothing, always return success
30 31 32 |
# File 'lib/tty/pager/null.rb', line 30 def close true end |
#puts(text) ⇒ Object
Pass output directly to stdout
21 22 23 24 25 |
# File 'lib/tty/pager/null.rb', line 21 def puts(text) return text unless output.tty? output.puts(text) end |
#write(text) ⇒ Object Also known as: <<
Pass output directly to stdout
11 12 13 14 15 |
# File 'lib/tty/pager/null.rb', line 11 def write(text) return text unless output.tty? output.write(text) end |