Class: Pennyworth::CLI::Actions::HTTPStatus

Inherits:
Sod::Action
  • Object
show all
Defined in:
lib/pennyworth/cli/actions/http_status.rb

Overview

Handles the HTTP status action.

Instance Method Summary collapse

Constructor Details

#initialize(processor: Processor.for_http_statuses) ⇒ HTTPStatus

Returns a new instance of HTTPStatus.



16
17
18
19
# File 'lib/pennyworth/cli/actions/http_status.rb', line 16

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

Instance Method Details

#callObject



21
# File 'lib/pennyworth/cli/actions/http_status.rb', line 21

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