Add API documentation.

This commit is contained in:
Robert Gleeson 2012-08-09 22:51:50 +01:00
parent 6d9b2ae1fa
commit 912073041d
1 changed files with 21 additions and 4 deletions

View File

@ -1,8 +1,21 @@
class Pry::Pager
def self.page_size
27
end
#
# @param [String] text
# A piece of text to run through a pager.
#
# @param [:simple] pager
# Use the pure ruby pager.
#
# @param [:system] pager
# Use the system pager (less)
#
# @param [nil] pager
# Infer what pager to use from the environment.
# What this really means is that JRuby uses the pure-ruby pager, and other
# platforms will use the system pager.
#
# @return [void]
#
def self.page(text, pager = nil)
case pager
when nil
@ -17,6 +30,10 @@ class Pry::Pager
end
end
def self.page_size
27
end
def initialize(text)
@text = text
end