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