Class: Pennyworth::Presenters::System::Error

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/pennyworth/presenters/system/error.rb

Overview

Shapes a system error record for serialization.

Instance Method Summary collapse

Constructor Details

#initialize(record) ⇒ Error

Returns a new instance of Error.



14
15
16
# File 'lib/pennyworth/presenters/system/error.rb', line 14

def initialize record
  @record = record
end

Instance Method Details

#labelObject



18
# File 'lib/pennyworth/presenters/system/error.rb', line 18

def label = record.name

#subtitleObject



20
# File 'lib/pennyworth/presenters/system/error.rb', line 20

def subtitle = "#{label}: #{description}."