Class: BitClust::ErrorScreen
- Includes:
- HTMLUtils
- Defined in:
- lib/bitclust/screen.rb
Constant Summary
Constants included from NameUtils
NameUtils::CHAR_TO_MARK, NameUtils::CHAR_TO_NAME, NameUtils::CLASS_NAME_RE, NameUtils::CLASS_PATH_RE, NameUtils::CONST_PATH_RE, NameUtils::CONST_RE, NameUtils::GVAR_RE, NameUtils::LIBNAME_RE, NameUtils::MARK_TO_CHAR, NameUtils::MARK_TO_NAME, NameUtils::METHOD_NAME_RE, NameUtils::METHOD_SPEC_RE, NameUtils::MID, NameUtils::NAME_TO_CHAR, NameUtils::NAME_TO_MARK, NameUtils::TYPEMARK_RE
Instance Method Summary collapse
- #body ⇒ Object
- #content_type ⇒ Object
-
#initialize(err) ⇒ ErrorScreen
constructor
A new instance of ErrorScreen.
- #status ⇒ Object
Methods included from NameUtils
build_method_id, classid2name, classname2id, classname?, decodeid, decodename_fs, decodename_url, encodeid, encodename_fs, encodename_rdocurl, encodename_url, functionname?, gvarname?, html_filename, libid2name, libname2id, libname?, method_spec?, methodid2classid, methodid2libid, methodid2mname, methodid2specparts, methodid2specstring, methodid2typechar, methodid2typemark, methodid2typename, methodname?, split_method_id, split_method_spec, typechar2mark, typechar2name, typechar?, typemark2char, typemark2name, typemark?, typename2char, typename2mark, typename?
Methods inherited from Screen
Constructor Details
#initialize(err) ⇒ ErrorScreen
Returns a new instance of ErrorScreen.
210 211 212 |
# File 'lib/bitclust/screen.rb', line 210 def initialize(err) @error = err end |
Instance Method Details
#body ⇒ Object
222 223 224 225 226 227 228 229 230 231 232 233 |
# File 'lib/bitclust/screen.rb', line 222 def body <<-EndHTML <html> <head><title>Error</title></head> <body> <h1>Error</h1> <pre>#{escape_html(@error.)} (#{escape_html(@error.class.name)}) #{@error.backtrace.map {|s| escape_html(s) }.join("\n")}</pre> </body> </html> EndHTML end |
#content_type ⇒ Object
218 219 220 |
# File 'lib/bitclust/screen.rb', line 218 def content_type 'text/html' end |
#status ⇒ Object
214 215 216 |
# File 'lib/bitclust/screen.rb', line 214 def status 500 end |