# File lib/couchrest/helper/pager.rb, line 8 def all_docs(limit=100, &block) startkey = nil oldend = nil while docrows = request_all_docs(limit+1, startkey) startkey = docrows.last['key'] docrows.pop if docrows.length > limit if oldend == startkey break end yield(docrows) oldend = startkey end end