lib/cuba/send_file.rb in cuba-sendfile-0.0.1 vs lib/cuba/send_file.rb in cuba-sendfile-0.0.2

- old
+ new

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