Class: ClaudeMemory::Commands::Checks::DatabaseCheck
- Inherits:
-
Object
- Object
- ClaudeMemory::Commands::Checks::DatabaseCheck
- Defined in:
- lib/claude_memory/commands/checks/database_check.rb
Overview
Checks database existence, schema, and health
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(db_path, label) ⇒ DatabaseCheck
constructor
A new instance of DatabaseCheck.
Constructor Details
#initialize(db_path, label) ⇒ DatabaseCheck
Returns a new instance of DatabaseCheck.
8 9 10 11 |
# File 'lib/claude_memory/commands/checks/database_check.rb', line 8 def initialize(db_path, label) @db_path = db_path @label = label end |
Instance Method Details
#call ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/claude_memory/commands/checks/database_check.rb', line 13 def call unless File.exist?(@db_path) return missing_database_result end check_database_health rescue => e { status: :error, label: @label, message: "#{@label} database error: #{e.}", details: {} } end |