Class: Textus::Read::Doctor

Inherits:
Object
  • Object
show all
Extended by:
Contract::DSL
Defined in:
lib/textus/read/doctor.rb

Overview

Dispatched use case for the ‘doctor` verb. The health-check report is built by the Textus::Doctor library module; this class is the uniform (container:, call:) entry point that Dispatcher::VERBS resolves to. The acting role is irrelevant to a read-only health check, so `call` is not consulted.

Instance Method Summary collapse

Methods included from Contract::DSL

arg, around, cli, cli_stdin, contract, contract?, summary, surfaces, verb, view

Constructor Details

#initialize(container:, call:) ⇒ Doctor

Returns a new instance of Doctor.



17
18
19
20
# File 'lib/textus/read/doctor.rb', line 17

def initialize(container:, call:)
  @container = container
  @call      = call
end

Instance Method Details

#call(checks: nil) ⇒ Object



22
23
24
# File 'lib/textus/read/doctor.rb', line 22

def call(checks: nil)
  Textus::Doctor.build(container: @container, checks: checks)
end