class Cuba module SendFile def send_file(path, headers = {}) file = Rack::File.new(nil, headers) file.path = path result = file.serving(env) halt([result[0], result[1], file]) end end end