Git-style automatic paging in Ruby
gem install pager
require 'pager'
class Example
include Pager
def output_lots_of_text
page
# any output after this line will be automatically paged
end
end
This library is merely a packaged version of the run_pager code
snippet by Nathan Weizenbaum. It was originally built for use
with cheat by Chris Wanstrath. The snipped was packaged
as a gem by Erik Michaels-Ober for use with t.
Many thanks to Denis Knauf for relinquishing the pager gem name
to this project. If you're looking for irb-pager, it can be found
here.
- Fork it
- Create a topic branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Added some feature') - Push to the branch (
git push origin my-new-feature) - Submit a pull request.