Class: ExceptionData
- Inherits:
-
Object
- Object
- ExceptionData
- Defined in:
- lib/errorapp_notifier/exception_data.rb
Instance Attribute Summary collapse
-
#exception ⇒ Object
readonly
Returns the value of attribute exception.
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(exception) ⇒ ExceptionData
constructor
A new instance of ExceptionData.
Constructor Details
#initialize(exception) ⇒ ExceptionData
Returns a new instance of ExceptionData.
4 5 6 |
# File 'lib/errorapp_notifier/exception_data.rb', line 4 def initialize(exception) @exception = exception end |
Instance Attribute Details
#exception ⇒ Object (readonly)
Returns the value of attribute exception.
2 3 4 |
# File 'lib/errorapp_notifier/exception_data.rb', line 2 def exception @exception end |
Instance Method Details
#data ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/errorapp_notifier/exception_data.rb', line 8 def data { :exception => { :exception_class => exception.class.to_s, :message => exception., :backtrace => exception.backtrace, :occurred_at => Time.now.utc.iso8601 } } end |