Module: DeviseCasAuthenticatable::SingleSignOut::WithConn

Included in:
DestroySession, Strategies::RedisCache
Defined in:
lib/devise_cas_authenticatable/single_sign_out/with_conn.rb

Instance Method Summary collapse

Instance Method Details

#with_conn(&block) ⇒ Object


4
5
6
7
8
9
10
11
# File 'lib/devise_cas_authenticatable/single_sign_out/with_conn.rb', line 4

def with_conn(&block)
  if old_style_conn = current_session_store.instance_variable_get(:@pool)
    yield old_style_conn
  else
    current_session_store.instance_variable_get(:@conn)
      .instance_variable_get(:@pool).with &block
  end
end