Class: Pennyworth::Serializers::System::Signal

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

Overview

Serializes a system signal presenter for parsing by Alfred script filters.

Instance Method Summary collapse

Constructor Details

#initialize(presenter) ⇒ Signal

Returns a new instance of Signal.



8
9
10
# File 'lib/pennyworth/serializers/system/signal.rb', line 8

def initialize presenter
  @presenter = presenter
end

Instance Method Details

#to_hObject



12
13
14
15
16
17
18
19
20
21
# File 'lib/pennyworth/serializers/system/signal.rb', line 12

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