Class: ClaudeMemory::Core::SessionId
- Inherits:
-
Object
- Object
- ClaudeMemory::Core::SessionId
- Defined in:
- lib/claude_memory/core/session_id.rb
Overview
Value object representing a session identifier Provides type safety and validation for session IDs
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
-
#initialize(value) ⇒ SessionId
constructor
A new instance of SessionId.
- #to_s ⇒ Object
Constructor Details
#initialize(value) ⇒ SessionId
Returns a new instance of SessionId.
10 11 12 13 14 |
# File 'lib/claude_memory/core/session_id.rb', line 10 def initialize(value) @value = value.to_s validate! freeze end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
8 9 10 |
# File 'lib/claude_memory/core/session_id.rb', line 8 def value @value end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
20 21 22 |
# File 'lib/claude_memory/core/session_id.rb', line 20 def ==(other) other.is_a?(SessionId) && other.value == value end |
#hash ⇒ Object
26 27 28 |
# File 'lib/claude_memory/core/session_id.rb', line 26 def hash value.hash end |
#to_s ⇒ Object
16 17 18 |
# File 'lib/claude_memory/core/session_id.rb', line 16 def to_s value end |