Module: JWTSessions::StoreAdapters
- Defined in:
- lib/jwt_sessions/store_adapters.rb,
lib/jwt_sessions/store_adapters/redis_store_adapter.rb,
lib/jwt_sessions/store_adapters/memory_store_adapter.rb,
lib/jwt_sessions/store_adapters/abstract_store_adapter.rb
Defined Under Namespace
Classes: AbstractStoreAdapter, MemoryStoreAdapter, RedisStoreAdapter
Class Method Summary collapse
Class Method Details
.build_by_name(adapter, options = nil) ⇒ Object
9 10 11 12 13 |
# File 'lib/jwt_sessions/store_adapters.rb', line 9 def self.build_by_name(adapter, = nil) camelized_adapter = adapter.to_s.split('_').map(&:capitalize).join adapter_class_name = "#{camelized_adapter}StoreAdapter" StoreAdapters.const_get(adapter_class_name).new(**( || {})) end |