debian-mirror-gitlab/lib/gitlab/namespaced_session_store.rb
2019-07-31 17:26:46 +00:00

22 lines
350 B
Ruby

# 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