Module: Permissable
- Defined in:
- lib/permissable.rb
Defined Under Namespace
Modules: ClassMethods, InstanceMethods
Classes: FakeRedis
Constant Summary
collapse
- ALL_SCOPES =
['full']
Class Method Summary
collapse
Class Method Details
.add_scope(str) ⇒ Object
5
6
7
|
# File 'lib/permissable.rb', line 5
def self.add_scope(str)
ALL_SCOPES.push(str)
end
|
.cache_token ⇒ Object
36
37
38
39
40
|
# File 'lib/permissable.rb', line 36
def self.cache_token
@cache_token ||= 'permissable_redis_cache_token'
@cache_token
end
|
.permissions_redis ⇒ Object
31
32
33
34
|
# File 'lib/permissable.rb', line 31
def self.permissions_redis
@permissions_redis ||= FakeRedis.new
@permissions_redis
end
|
.set_redis(redis, cache_token) ⇒ Object
9
10
11
12
|
# File 'lib/permissable.rb', line 9
def self.set_redis(redis, cache_token)
@permissions_redis = redis
@cache_token = cache_token
end
|