From ac52505faace1b2386e2555049806d2867586d06 Mon Sep 17 00:00:00 2001 From: Stephen Best Date: Tue, 13 Aug 2013 08:18:52 +0100 Subject: [PATCH] Restore public API --- lib/rack/showexceptions.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/rack/showexceptions.rb b/lib/rack/showexceptions.rb index 0e8a59522..d81273801 100644 --- a/lib/rack/showexceptions.rb +++ b/lib/rack/showexceptions.rb @@ -45,11 +45,14 @@ def call(env) ] end - private + def prefers_plaintext?(env) + !accepts_html(env) + end def accepts_html?(env) env["HTTP_ACCEPT"] && env["HTTP_ACCEPT"].include?("text/html") end + private :accepts_html? def dump_exception(exception) string = "#{exception.class}: #{exception.message}\n"