Sha256: cb6eb15dda64dca1c7acd112987568306974aac11fe1fd00f88e3a93e1e680a1

Contents?: true

Size: 552 Bytes

Versions: 7

Compression:

Stored size: 552 Bytes

Contents

# frozen_string_literal: true

require "sod"

module Pennyworth
  module CLI
    module Actions
      # Handles the encoding action.
      class Encoding < Sod::Action
        include Import[:kernel]

        description "Render Alfred encodings script filter."

        on "--encodings"

        def initialize(processor: Processor.for_encodings, **)
          super(**)
          @processor = processor
        end

        def call(*) = kernel.puts processor.call.to_json

        private

        attr_reader :processor
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pennyworth-16.7.0 lib/pennyworth/cli/actions/encoding.rb
pennyworth-16.5.0 lib/pennyworth/cli/actions/encoding.rb
pennyworth-16.4.0 lib/pennyworth/cli/actions/encoding.rb
pennyworth-16.3.0 lib/pennyworth/cli/actions/encoding.rb
pennyworth-16.2.0 lib/pennyworth/cli/actions/encoding.rb
pennyworth-16.1.0 lib/pennyworth/cli/actions/encoding.rb
pennyworth-16.0.0 lib/pennyworth/cli/actions/encoding.rb