debian-mirror-gitlab/lib/gitlab/namespaced_session_store.rb

23 lines
350 B
Ruby
Raw Normal View History

2019-07-31 22:56:46 +05:30
# frozen_string_literal: true
module Gitlab
class NamespacedSessionStore
delegate :[], :[]=, to: :store
def initialize(key)
@key = key
end
def initiated?
!Session.current.nil?
end
def store
return unless Session.current
Session.current[@key] ||= {}
Session.current[@key]
end
end
end