Class: LlmCostTracker::Doctor::CaptureVerifier

Inherits:
Object
  • Object
show all
Defined in:
lib/llm_cost_tracker/doctor/capture_verifier.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.callObject



10
11
12
# File 'lib/llm_cost_tracker/doctor/capture_verifier.rb', line 10

def call
  new.checks
end

.healthy?(checks = call) ⇒ Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/llm_cost_tracker/doctor/capture_verifier.rb', line 20

def healthy?(checks = call)
  checks.none? { |check| check.status == :error }
end

.report(checks = call) ⇒ Object



14
15
16
17
18
# File 'lib/llm_cost_tracker/doctor/capture_verifier.rb', line 14

def report(checks = call)
  (["LLM Cost Tracker capture verification"] + checks.map do |check|
    "[#{check.status}] #{check.name}: #{check.message}"
  end).join("\n")
end

Instance Method Details

#checksObject



25
26
27
28
29
30
31
# File 'lib/llm_cost_tracker/doctor/capture_verifier.rb', line 25

def checks
  [
    enabled_check,
    *integration_checks,
    *storage_checks
  ].compact
end