Class: ClaudeMemory::Hook::Handler::SingleStoreFacade
- Inherits:
-
Object
- Object
- ClaudeMemory::Hook::Handler::SingleStoreFacade
- Defined in:
- lib/claude_memory/hook/handler.rb
Instance Method Summary collapse
-
#initialize(store) ⇒ SingleStoreFacade
constructor
A new instance of SingleStoreFacade.
- #store_if_exists(scope) ⇒ Object
Constructor Details
#initialize(store) ⇒ SingleStoreFacade
Returns a new instance of SingleStoreFacade.
256 257 258 |
# File 'lib/claude_memory/hook/handler.rb', line 256 def initialize(store) @store = store end |
Instance Method Details
#store_if_exists(scope) ⇒ Object
260 261 262 263 264 265 266 267 268 |
# File 'lib/claude_memory/hook/handler.rb', line 260 def store_if_exists(scope) # The manager's store_if_exists returns nil for the absent # scope; we don't know which scope this single store # represents, so return it for "project" and nil for # "global". Counts undercount global-only setups, which is # acceptable — global-only users would normally pass a # manager. (scope == "project") ? @store : nil end |