summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/zorglub/session.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/zorglub/session.rb b/lib/zorglub/session.rb
index a20dfcc..8162cf1 100644
--- a/lib/zorglub/session.rb
+++ b/lib/zorglub/session.rb
@@ -28,6 +28,11 @@ module Zorglub
@session_data = SessionHash.data[sid]||={}
end
#
+ def destroy!
+ SessionHash.data.delete @sid
+ @session_data = nil
+ @sid = nil
+ end
#
def [] idx
@session_data[idx]
@@ -66,6 +71,12 @@ module Zorglub
end
private :setup!
#
+ def destroy!
+ @response.delete_cookie Session.key
+ @instance.destroy! if @instance
+ @instance = nil
+ end
+ #
def sid
setup! if @instance.nil?
return nil if @instance.nil?