Class: Pennyworth::Presenters::StandardError
- Inherits:
-
Object
- Object
- Pennyworth::Presenters::StandardError
- Defined in:
- lib/pennyworth/presenters/standard_error.rb
Overview
Shapes a standard error record for serialization.
Instance Method Summary collapse
- #id ⇒ Object
-
#initialize(record) ⇒ StandardError
constructor
A new instance of StandardError.
- #label ⇒ Object
- #path ⇒ Object
Constructor Details
#initialize(record) ⇒ StandardError
Returns a new instance of StandardError.
11 12 13 |
# File 'lib/pennyworth/presenters/standard_error.rb', line 11 def initialize record @record = record end |
Instance Method Details
#id ⇒ Object
15 |
# File 'lib/pennyworth/presenters/standard_error.rb', line 15 def id = label |
#label ⇒ Object
17 |
# File 'lib/pennyworth/presenters/standard_error.rb', line 17 def label = record.name.to_s |
#path ⇒ Object
19 |
# File 'lib/pennyworth/presenters/standard_error.rb', line 19 def path = file_path.empty? ? "" : [file_path, record.line_number].compress.join(":") |