def all(opts={})

      opts = opts.dup
        # don't touch the original

      path = adjust('_all_docs')

      opts[:include_docs] = true if opts[:include_docs].nil?

      adjust_params(opts)

      keys = opts.delete(:keys)

      return [] if keys && keys.empty?

      res = if keys
        opts[:cache] = :with_body if opts[:cache].nil?
        @http.post(path, { 'keys' => keys }, opts)
      else
        @http.get(path, opts)
      end

      rows = res['rows']

      docs = if opts[:params][:include_docs]
        rows.map { |row| row['doc'] }
      else
        rows.map { |row| { '_id' => row['id'], '_rev' => row['value']['rev'] } }
      end

      if opts[:include_design_docs] == false
        docs = docs.reject { |doc| DESIGN_PATH_REGEX.match(doc['_id']) }
      end

      docs
    end
def all(opts={})

      opts = opts.dup
        # don't touch the original

      path = adjust('_all_docs')

      opts[:include_docs] = true if opts[:include_docs].nil?

      adjust_params(opts)

      keys = opts.delete(:keys)

      return [] if keys && keys.empty?

      res = if keys
        opts[:cache] = :with_body if opts[:cache].nil?
        @http.post(path, { 'keys' => keys }, opts)
      else
        @http.get(path, opts)
      end

      rows = res['rows']

      docs = if opts[:params][:include_docs]
        rows.map { |row| row['doc'] }
      else
        rows.map { |row| { '_id' => row['id'], '_rev' => row['value']['rev'] } }
      end

      if opts[:include_design_docs] == false
        docs = docs.reject { |doc| DESIGN_PATH_REGEX.match(doc['_id']) }
      end

      docs
    end
Returns all the docs in the current database.

   c = Rufus::Jig::Couch.new('http://127.0.0.1:5984, 'my_db')

   docs = c.all
   docs = c.all(:include_docs => false)
   docs = c.all(:include_design_docs => false)

   docs = c.all(:skip => 10, :limit => 10)

 It understands (passes) all the options for CouchDB view API :

   http://wiki.apache.org/couchdb/HTTP_view_API#Querying_Options