Sha256: 013e8043034fe248dac3d1a1932a41539c4f00c037d4a26f05fee7d532f6b45e

Contents?: true

Size: 520 Bytes

Versions: 54

Compression:

Stored size: 520 Bytes

Contents

# frozen_string_literal: true

require "forwardable"

module Pennyworth
  module Presenters
    module System
      # Renders system error into a compatible format for use in Alfred script filters.
      class Error
        extend Forwardable

        delegate %i[id description] => :record

        def initialize record
          @record = record
        end

        def label = record.name

        def subtitle = "#{label}: #{description}."

        private

        attr_reader :record
      end
    end
  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
pennyworth-17.3.0 lib/pennyworth/presenters/system/error.rb
pennyworth-17.2.0 lib/pennyworth/presenters/system/error.rb
pennyworth-17.1.0 lib/pennyworth/presenters/system/error.rb
pennyworth-17.0.0 lib/pennyworth/presenters/system/error.rb
pennyworth-16.7.0 lib/pennyworth/presenters/system/error.rb
pennyworth-16.5.0 lib/pennyworth/presenters/system/error.rb
pennyworth-16.4.0 lib/pennyworth/presenters/system/error.rb
pennyworth-16.3.0 lib/pennyworth/presenters/system/error.rb
pennyworth-16.2.0 lib/pennyworth/presenters/system/error.rb
pennyworth-16.1.0 lib/pennyworth/presenters/system/error.rb
pennyworth-16.0.0 lib/pennyworth/presenters/system/error.rb
pennyworth-15.4.1 lib/pennyworth/presenters/system/error.rb
pennyworth-15.4.0 lib/pennyworth/presenters/system/error.rb
pennyworth-15.3.0 lib/pennyworth/presenters/system/error.rb
pennyworth-15.2.0 lib/pennyworth/presenters/system/error.rb
pennyworth-15.1.1 lib/pennyworth/presenters/system/error.rb
pennyworth-15.1.0 lib/pennyworth/presenters/system/error.rb
pennyworth-15.0.3 lib/pennyworth/presenters/system/error.rb
pennyworth-15.0.2 lib/pennyworth/presenters/system/error.rb
pennyworth-15.0.1 lib/pennyworth/presenters/system/error.rb