Class: ClaudeMemory::Domain::Conflict
- Inherits:
-
Object
- Object
- ClaudeMemory::Domain::Conflict
- Defined in:
- lib/claude_memory/domain/conflict.rb
Overview
Domain model representing a conflict between two facts
Instance Attribute Summary collapse
-
#detected_at ⇒ Object
readonly
Returns the value of attribute detected_at.
-
#fact_a_id ⇒ Object
readonly
Returns the value of attribute fact_a_id.
-
#fact_b_id ⇒ Object
readonly
Returns the value of attribute fact_b_id.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#notes ⇒ Object
readonly
Returns the value of attribute notes.
-
#resolved_at ⇒ Object
readonly
Returns the value of attribute resolved_at.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Conflict
constructor
A new instance of Conflict.
- #open? ⇒ Boolean
- #resolved? ⇒ Boolean
- #to_h ⇒ Object
Constructor Details
#initialize(attributes) ⇒ Conflict
Returns a new instance of Conflict.
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/claude_memory/domain/conflict.rb', line 10 def initialize(attributes) @id = attributes[:id] @fact_a_id = attributes[:fact_a_id] @fact_b_id = attributes[:fact_b_id] @status = attributes[:status] || "open" @notes = attributes[:notes] @detected_at = attributes[:detected_at] @resolved_at = attributes[:resolved_at] validate! freeze end |
Instance Attribute Details
#detected_at ⇒ Object (readonly)
Returns the value of attribute detected_at.
7 8 9 |
# File 'lib/claude_memory/domain/conflict.rb', line 7 def detected_at @detected_at end |
#fact_a_id ⇒ Object (readonly)
Returns the value of attribute fact_a_id.
7 8 9 |
# File 'lib/claude_memory/domain/conflict.rb', line 7 def fact_a_id @fact_a_id end |
#fact_b_id ⇒ Object (readonly)
Returns the value of attribute fact_b_id.
7 8 9 |
# File 'lib/claude_memory/domain/conflict.rb', line 7 def fact_b_id @fact_b_id end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/claude_memory/domain/conflict.rb', line 7 def id @id end |
#notes ⇒ Object (readonly)
Returns the value of attribute notes.
7 8 9 |
# File 'lib/claude_memory/domain/conflict.rb', line 7 def notes @notes end |
#resolved_at ⇒ Object (readonly)
Returns the value of attribute resolved_at.
7 8 9 |
# File 'lib/claude_memory/domain/conflict.rb', line 7 def resolved_at @resolved_at end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
7 8 9 |
# File 'lib/claude_memory/domain/conflict.rb', line 7 def status @status end |
Instance Method Details
#open? ⇒ Boolean
23 24 25 |
# File 'lib/claude_memory/domain/conflict.rb', line 23 def open? status == "open" end |
#resolved? ⇒ Boolean
27 28 29 |
# File 'lib/claude_memory/domain/conflict.rb', line 27 def resolved? status == "resolved" end |
#to_h ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/claude_memory/domain/conflict.rb', line 31 def to_h { id: id, fact_a_id: fact_a_id, fact_b_id: fact_b_id, status: status, notes: notes, detected_at: detected_at, resolved_at: resolved_at } end |