Module: ShamRack::ResponseExtensions

Defined in:
lib/sham_rack/http.rb

Instance Method Summary collapse

Instance Method Details

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

Yields:

  • (@body)


98
99
100
101
102
# File 'lib/sham_rack/http.rb', line 98

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