Class: Authorize::Redis::String
- Inherits:
-
Base
- Object
- Base
- Authorize::Redis::String
show all
- Defined in:
- lib/authorize/redis/string.rb
Constant Summary
Constants inherited
from Base
Base::NAMESPACE_SEPARATOR
Instance Attribute Summary
Attributes inherited from Base
#id
Instance Method Summary
collapse
Methods inherited from Base
#==, #_dump, _load, connection, connection_base?, connection_manager, #db, #destroy, #eql?, exists?, #exists?, generate_key, #hash, index, load, load_all, #logger, #method_missing, new, next_counter, #reload, #respond_to?, subordinate_key, #subordinate_key, #to_yaml
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Authorize::Redis::Base
Instance Method Details
#__getobj__ ⇒ Object
8
9
10
|
# File 'lib/authorize/redis/string.rb', line 8
def __getobj__
db.get(id)
end
|
#set(v) ⇒ Object
12
13
14
|
# File 'lib/authorize/redis/string.rb', line 12
def set(v)
db.set(id, v)
end
|
#valid? ⇒ Boolean
4
5
6
|
# File 'lib/authorize/redis/string.rb', line 4
def valid?
%w(none string).include?(db.type(id))
end
|