Sha256: 4e3c2d7b7511cfb735fd2c7498827a4fb075fa9abeb7fa57f4c0ac5387f71758
Contents?: true
Size: 631 Bytes
Versions: 54
Compression:
Stored size: 631 Bytes
Contents
# frozen_string_literal: true module Pennyworth module Serializers # Serializes a text into a compatible format for parsing within Alfred script filters. class Text def initialize presenter @presenter = presenter end def to_h { uid: id, title: presenter.label, subtitle: id.capitalize, arg: content, icon: {path: "text/#{id}.png"}, text: {copy: content, largetype: content} } end private attr_reader :presenter def id = presenter.id def content = presenter.content end end end
Version data entries
54 entries across 54 versions & 1 rubygems