Class: Deas::ShowExceptions::Body
- Inherits:
-
Object
- Object
- Deas::ShowExceptions::Body
- Defined in:
- lib/deas/show_exceptions.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#mime_type ⇒ Object
readonly
Returns the value of attribute mime_type.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
Instance Method Summary collapse
-
#initialize(e) ⇒ Body
constructor
A new instance of Body.
Constructor Details
#initialize(e) ⇒ Body
Returns a new instance of Body.
39 40 41 42 43 |
# File 'lib/deas/show_exceptions.rb', line 39 def initialize(e) @content = "#{e.class}: #{e.}\n#{(e.backtrace || []).join("\n")}" @size = Rack::Utils.bytesize(@content) @mime_type = "text/plain" end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
37 38 39 |
# File 'lib/deas/show_exceptions.rb', line 37 def content @content end |
#mime_type ⇒ Object (readonly)
Returns the value of attribute mime_type.
37 38 39 |
# File 'lib/deas/show_exceptions.rb', line 37 def mime_type @mime_type end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
37 38 39 |
# File 'lib/deas/show_exceptions.rb', line 37 def size @size end |