Class: Pennyworth::Serializers::Project
- Inherits:
-
Object
- Object
- Pennyworth::Serializers::Project
- Defined in:
- lib/pennyworth/serializers/project.rb
Overview
Serializes a project presenter for parsing by Alfred script filters.
Instance Method Summary collapse
-
#initialize(presenter) ⇒ Project
constructor
A new instance of Project.
- #to_h ⇒ Object
Constructor Details
#initialize(presenter) ⇒ Project
Returns a new instance of Project.
7 8 9 |
# File 'lib/pennyworth/serializers/project.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/project.rb', line 11 def to_h { uid: presenter.id, title: presenter.label, subtitle: presenter.subtitle, arg: site_url, quicklookurl: site_url, mods: modifications, text: } end |