module Sinatra::Helpers
def body(value=nil, &block)
Set or retrieve the response body. When a block is given,
def body(value=nil, &block) if block_given? def block.each; yield(call) end response.body = block elsif value response.body = value else response.body end end