Class: Pennyworth::Serializers::StandardError

Inherits:
Object
  • Object
show all
Defined in:
lib/pennyworth/serializers/standard_error.rb

Overview

Serializes a standard error presenter for parsing by Alfred script filters.

Instance Method Summary collapse

Constructor Details

#initialize(presenter) ⇒ StandardError

Returns a new instance of StandardError.



7
8
9
# File 'lib/pennyworth/serializers/standard_error.rb', line 7

def initialize presenter
  @presenter = presenter
end

Instance Method Details

#to_hObject



11
12
13
14
15
16
17
18
19
# File 'lib/pennyworth/serializers/standard_error.rb', line 11

def to_h
  {
    uid: id,
    title: id,
    arg: label,
    mods: modifications,
    text: {copy: label, largetype: label}
  }
end