Sha256: 852ab106fa1b55b22c43a71511dcc86b52272e66fbaf321c4dbe5bff7921a685
Contents?: true
Size: 752 Bytes
Versions: 11
Compression:
Stored size: 752 Bytes
Contents
# frozen_string_literal: true module Pennyworth module Serializers # Serializes a encoding into a compatible format for parsing within Alfred script filters. class Encoding using Refinements::Array def initialize presenter @presenter = presenter end def to_h { uid: presenter.id, title: label, subtitle: %(Aliases: #{aliases.to_sentence}.), arg: label, mods: { alt: {subtitle: "Copy aliases.", arg: aliases.join(", ")} }, text: {copy: label, largetype: label} } end private attr_reader :presenter def label = presenter.label def aliases = presenter.aliases end end end
Version data entries
11 entries across 11 versions & 1 rubygems