Class: ClaudeMemory::Core::TranscriptPath

Inherits:
Object
  • Object
show all
Defined in:
lib/claude_memory/core/transcript_path.rb

Overview

Value object representing a transcript file path Provides type safety and validation for file paths

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ TranscriptPath

Returns a new instance of TranscriptPath.



10
11
12
13
14
# File 'lib/claude_memory/core/transcript_path.rb', line 10

def initialize(value)
  @value = value.to_s
  validate!
  freeze
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



8
9
10
# File 'lib/claude_memory/core/transcript_path.rb', line 8

def value
  @value
end

Instance Method Details

#==(other) ⇒ Object Also known as: eql?



20
21
22
# File 'lib/claude_memory/core/transcript_path.rb', line 20

def ==(other)
  other.is_a?(TranscriptPath) && other.value == value
end

#hashObject



26
27
28
# File 'lib/claude_memory/core/transcript_path.rb', line 26

def hash
  value.hash
end

#to_sObject



16
17
18
# File 'lib/claude_memory/core/transcript_path.rb', line 16

def to_s
  value
end