Class: Textus::Surfaces::CLI::Verb::Doctor

Inherits:
Textus::Surfaces::CLI::Verb show all
Defined in:
lib/textus/surfaces/cli/verb/doctor.rb

Instance Attribute Summary

Attributes inherited from Textus::Surfaces::CLI::Verb

#positional, #stdin

Instance Method Summary collapse

Methods inherited from Textus::Surfaces::CLI::Verb

command_name, descendants, #emit, #gate_dispatch, inherited, #initialize, needs_store?, option, options, parent_group, #parse, #resolved_role

Constructor Details

This class inherits a constructor from Textus::Surfaces::CLI::Verb

Instance Method Details

#call(store) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/textus/surfaces/cli/verb/doctor.rb', line 9

def call(store)
  cmd = Textus::Command::Doctor.new(
    checks: checks&.split(",")&.map(&:strip),
    role: resolved_role(store),
  )
  res = store.gate.dispatch(cmd)
  emit(res, exit_code: res["ok"] ? 0 : 1)
end