Add paginate program for ruby.
Migrate querystring function to separate library file for all languages.