Class: Dreamcatcher::ExceptionContext
- Inherits:
-
Object
- Object
- Dreamcatcher::ExceptionContext
- Defined in:
- lib/dreamcatcher/exception_context.rb
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#exception ⇒ Object
readonly
Returns the value of attribute exception.
-
#log_entries ⇒ Object
readonly
Returns the value of attribute log_entries.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(exception, log_entries, context = {}) ⇒ ExceptionContext
constructor
A new instance of ExceptionContext.
Constructor Details
#initialize(exception, log_entries, context = {}) ⇒ ExceptionContext
Returns a new instance of ExceptionContext.
5 6 7 8 |
# File 'lib/dreamcatcher/exception_context.rb', line 5 def initialize(exception, log_entries, context = {}) @exception, @log_entries, @context = exception, log_entries, context @timestamp = Time.now end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
3 4 5 |
# File 'lib/dreamcatcher/exception_context.rb', line 3 def context @context end |
#exception ⇒ Object (readonly)
Returns the value of attribute exception.
3 4 5 |
# File 'lib/dreamcatcher/exception_context.rb', line 3 def exception @exception end |
#log_entries ⇒ Object (readonly)
Returns the value of attribute log_entries.
3 4 5 |
# File 'lib/dreamcatcher/exception_context.rb', line 3 def log_entries @log_entries end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
3 4 5 |
# File 'lib/dreamcatcher/exception_context.rb', line 3 def @timestamp end |
Instance Method Details
#[](key) ⇒ Object
10 11 12 |
# File 'lib/dreamcatcher/exception_context.rb', line 10 def [](key) @context[key] end |