Sha256: 72b0d26b155e97650c6a889b5f7142f02b400ba5dff7aff0f4a9953b563e3153

Contents?: true

Size: 235 Bytes

Versions: 2

Compression:

Stored size: 235 Bytes

Contents

module AccessPolicyRails
  require 'request_store'

  class RequestLocalStorage < ScopedStorage::ThreadLocalStorage

    def self.for(scope_name="default")
      RequestStore.store["_#{name}_#{scope_name}"] ||= new
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
access_policy_rails-0.0.2 lib/access_policy_rails/request_local_storage.rb
access_policy_rails-0.0.1 lib/access_policy_rails/request_local_storage.rb