Class: ActionMCP::Client::SessionStoreFactory
- Inherits:
-
Object
- Object
- ActionMCP::Client::SessionStoreFactory
- Defined in:
- lib/action_mcp/client/session_store_factory.rb
Overview
Factory for creating session stores
Class Method Summary collapse
Class Method Details
.create(type = nil, **_options) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/action_mcp/client/session_store_factory.rb', line 7 def self.create(type = nil, **) type ||= default_type case type.to_sym when :volatile, :memory VolatileSessionStore.new when :active_record, :persistent ActiveRecordSessionStore.new when :test TestSessionStore.new else raise ArgumentError, "Unknown session store type: #{type}" end end |
.default_type ⇒ Object
22 23 24 |
# File 'lib/action_mcp/client/session_store_factory.rb', line 22 def self.default_type ActionMCP.configuration.client_session_store_type end |