Class: Textus::Surface::CLI::Verb::Doctor

Inherits:
Verb
  • Object
show all
Defined in:
lib/textus/surface/cli/verb/doctor.rb

Instance Method Summary collapse

Instance Method Details

#call(store) ⇒ Object



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

def call(store)
  Textus::VerbRegistry.for(:doctor)
  inputs = { checks: checks&.split(",")&.map(&:strip) }
  s = store.with_role(resolved_role(store))
  res = s.doctor(**inputs)
  emit(res, exit_code: res["ok"] ? 0 : 1)
end