Sha256: 209ebb8b246844d6b942fec26638e4de0cf3aa6870d329af2f2c767b47a618c6

Contents?: true

Size: 523 Bytes

Versions: 7

Compression:

Stored size: 523 Bytes

Contents

# frozen_string_literal: true

module Pennyworth
  module CLI
    module Actions
      # Handles the HTTP statuses action.
      class HTTPStatuses
        def initialize processor: Processor.for_http_statuses, container: Container
          @processor = processor
          @container = container
        end

        def call = processor.call.to_json.then { |json| logger.info { json } }

        private

        attr_reader :processor, :container

        def logger = container[__method__]
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pennyworth-12.3.1 lib/pennyworth/cli/actions/http_statuses.rb
pennyworth-12.3.0 lib/pennyworth/cli/actions/http_statuses.rb
pennyworth-12.2.0 lib/pennyworth/cli/actions/http_statuses.rb
pennyworth-12.1.0 lib/pennyworth/cli/actions/http_statuses.rb
pennyworth-12.0.2 lib/pennyworth/cli/actions/http_statuses.rb
pennyworth-12.0.1 lib/pennyworth/cli/actions/http_statuses.rb
pennyworth-12.0.0 lib/pennyworth/cli/actions/http_statuses.rb