Class: ClaudeMemory::Core::Failure
- Inherits:
-
Result
- Object
- Result
- ClaudeMemory::Core::Failure
show all
- Defined in:
- lib/claude_memory/core/result.rb
Overview
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods inherited from Result
failure, #failure?, success
Constructor Details
#initialize(error) ⇒ Failure
Returns a new instance of Failure.
117
118
119
120
|
# File 'lib/claude_memory/core/result.rb', line 117
def initialize(error)
@error = error
freeze
end
|
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error.
115
116
117
|
# File 'lib/claude_memory/core/result.rb', line 115
def error
@error
end
|
Instance Method Details
#flat_map ⇒ Object
134
135
136
|
# File 'lib/claude_memory/core/result.rb', line 134
def flat_map
self
end
|
#map ⇒ Object
130
131
132
|
# File 'lib/claude_memory/core/result.rb', line 130
def map
self
end
|
#or_else(default) ⇒ Object
138
139
140
|
# File 'lib/claude_memory/core/result.rb', line 138
def or_else(default)
default
end
|
#success? ⇒ Boolean
122
123
124
|
# File 'lib/claude_memory/core/result.rb', line 122
def success?
false
end
|
#value ⇒ Object
126
127
128
|
# File 'lib/claude_memory/core/result.rb', line 126
def value
raise "Cannot get value from Failure: #{error}"
end
|