Module: ShamRack::NetHttp::ResponseExtensions

Defined in:
lib/sham_rack/net_http.rb

Instance Method Summary collapse

Instance Method Details

#read_body(dest = nil) {|@body| ... } ⇒ Object

Yields:

  • (@body)


103
104
105
106
107
# File 'lib/sham_rack/net_http.rb', line 103

def read_body(dest = nil)
  yield @body if block_given?
  dest << @body if dest
  return @body
end