From 877f64d3b470b9821a28ea75d2962de1a198cc0e Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 5 Mar 2017 23:04:01 +0000 Subject: response: more documentation cleanups Our accessors are unfortunately set in stone, but there's no need to document them. The #each method should also yield a meaningful variable name for RDoc. --- lib/kcar/response.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/kcar/response.rb b/lib/kcar/response.rb index af15ca0..7fa804b 100644 --- a/lib/kcar/response.rb +++ b/lib/kcar/response.rb @@ -4,7 +4,9 @@ # This may be used to generate a Rack response synchronously. class Kcar::Response + # :stopdoc: attr_accessor :sock, :hdr, :unchunk, :buf, :parser + # :startdoc: # By default we readpartial at most 16K off a socket at once READ_SIZE = 0x4000 @@ -60,11 +62,11 @@ class Kcar::Response def each return if @parser.body_eof? if @unchunk - @parser.chunked? ? each_unchunk { |x| yield x } : - each_identity { |x| yield x } + @parser.chunked? ? each_unchunk { |buf| yield buf } : + each_identity { |buf| yield buf } else - @parser.chunked? ? each_rechunk { |x| yield x } : - each_identity { |x| yield x } + @parser.chunked? ? each_rechunk { |buf| yield buf } : + each_identity { |buf| yield buf } end end -- cgit v1.2.3-24-ge0c7