Class: Pennyworth::Serializers::System::Error
- Inherits:
-
Object
- Object
- Pennyworth::Serializers::System::Error
- Defined in:
- lib/pennyworth/serializers/system/error.rb
Overview
Serializes a system error presenter for parsing by Alfred script filters.
Instance Method Summary collapse
-
#initialize(presenter) ⇒ Error
constructor
A new instance of Error.
- #to_h ⇒ Object
Constructor Details
#initialize(presenter) ⇒ Error
Returns a new instance of Error.
8 9 10 |
# File 'lib/pennyworth/serializers/system/error.rb', line 8 def initialize presenter @presenter = presenter end |
Instance Method Details
#to_h ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/pennyworth/serializers/system/error.rb', line 12 def to_h { uid: id, title: id, subtitle: presenter.subtitle, arg: label, mods: modifications, text: {copy: label, largetype: label} } end |