Class: ClaudeMemory::Core::NullExplanation
- Inherits:
-
Object
- Object
- ClaudeMemory::Core::NullExplanation
- Defined in:
- lib/claude_memory/core/null_explanation.rb
Overview
Null object pattern for Explanation Represents a non-existent explanation without using nil
Instance Method Summary collapse
- #[](key) ⇒ Object
- #conflicts ⇒ Object
- #fact ⇒ Object
- #present? ⇒ Boolean
- #receipts ⇒ Object
- #superseded_by ⇒ Object
- #supersedes ⇒ Object
- #to_h ⇒ Object
Instance Method Details
#[](key) ⇒ Object
42 43 44 |
# File 'lib/claude_memory/core/null_explanation.rb', line 42 def [](key) to_h[key] end |
#conflicts ⇒ Object
28 29 30 |
# File 'lib/claude_memory/core/null_explanation.rb', line 28 def conflicts [] end |
#fact ⇒ Object
12 13 14 |
# File 'lib/claude_memory/core/null_explanation.rb', line 12 def fact NullFact.new end |
#present? ⇒ Boolean
8 9 10 |
# File 'lib/claude_memory/core/null_explanation.rb', line 8 def present? false end |
#receipts ⇒ Object
16 17 18 |
# File 'lib/claude_memory/core/null_explanation.rb', line 16 def receipts [] end |
#superseded_by ⇒ Object
20 21 22 |
# File 'lib/claude_memory/core/null_explanation.rb', line 20 def superseded_by [] end |
#supersedes ⇒ Object
24 25 26 |
# File 'lib/claude_memory/core/null_explanation.rb', line 24 def supersedes [] end |
#to_h ⇒ Object
32 33 34 35 36 37 38 39 40 |
# File 'lib/claude_memory/core/null_explanation.rb', line 32 def to_h { fact: fact.to_h, receipts: receipts, superseded_by: superseded_by, supersedes: supersedes, conflicts: conflicts } end |