Class: Deas::ShowExceptions::Body

Inherits:
Object
  • Object
show all
Defined in:
lib/deas/show_exceptions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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.message}\n#{(e.backtrace || []).join("\n")}"
  @size      = Rack::Utils.bytesize(@content)
  @mime_type = "text/plain"
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



37
38
39
# File 'lib/deas/show_exceptions.rb', line 37

def content
  @content
end

#mime_typeObject (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

#sizeObject (readonly)

Returns the value of attribute size.



37
38
39
# File 'lib/deas/show_exceptions.rb', line 37

def size
  @size
end