Sha256: 20c010a04be7ae7f993e2e9ef2a15b1b60076047d5118c534c18eef080e7cbd8

Contents?: true

Size: 561 Bytes

Versions: 10

Compression:

Stored size: 561 Bytes

Contents

# frozen_string_literal: true

require "sod"

module Pennyworth
  module CLI
    module Actions
      # Handles the HTTP status action.
      class HTTPStatus < Sod::Action
        include Import[:io]

        description "Render Alfred HTTP statuses script filter."

        on "--http_statuses"

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

        def call(*) = io.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-17.8.0 lib/pennyworth/cli/actions/http_status.rb
pennyworth-17.7.0 lib/pennyworth/cli/actions/http_status.rb
pennyworth-17.6.0 lib/pennyworth/cli/actions/http_status.rb
pennyworth-17.5.0 lib/pennyworth/cli/actions/http_status.rb
pennyworth-17.4.1 lib/pennyworth/cli/actions/http_status.rb
pennyworth-17.4.0 lib/pennyworth/cli/actions/http_status.rb
pennyworth-17.3.0 lib/pennyworth/cli/actions/http_status.rb
pennyworth-17.2.0 lib/pennyworth/cli/actions/http_status.rb
pennyworth-17.1.0 lib/pennyworth/cli/actions/http_status.rb
pennyworth-17.0.0 lib/pennyworth/cli/actions/http_status.rb