class Sinatra::Response
Public Instance Methods
send(status=200)
click to toggle source
# File lib/helpers.rb, line 17 def send(status=200) set_content_length! [status, self.headers, self.body] end
set_content_length!()
click to toggle source
# File lib/helpers.rb, line 12 def set_content_length! self["Content-Length"] = self.body.inject(0) {|a, l| a += l.length} end