Sha256: b48ec0a30123412f0ebd65972471e3515618d4e651cf06c6491a17bcc8f1c159

Contents?: true

Size: 573 Bytes

Versions: 10

Compression:

Stored size: 573 Bytes

Contents

# frozen_string_literal: true

require "sod"

module Pennyworth
  module CLI
    module Actions
      # Handles the HTTP statuses action.
      class HTTPStatuses < Sod::Action
        include Import[:kernel]

        description "Render Alfred HTTP statuses script filter."

        on "--http_statuses"

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

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

        private

        attr_reader :processor
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
pennyworth-15.4.1 lib/pennyworth/cli/actions/http_statuses.rb
pennyworth-15.4.0 lib/pennyworth/cli/actions/http_statuses.rb
pennyworth-15.3.0 lib/pennyworth/cli/actions/http_statuses.rb
pennyworth-15.2.0 lib/pennyworth/cli/actions/http_statuses.rb
pennyworth-15.1.1 lib/pennyworth/cli/actions/http_statuses.rb
pennyworth-15.1.0 lib/pennyworth/cli/actions/http_statuses.rb
pennyworth-15.0.3 lib/pennyworth/cli/actions/http_statuses.rb
pennyworth-15.0.2 lib/pennyworth/cli/actions/http_statuses.rb
pennyworth-15.0.1 lib/pennyworth/cli/actions/http_statuses.rb
pennyworth-15.0.0 lib/pennyworth/cli/actions/http_statuses.rb