mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 09:00:51 +00:00
RubyRedis: Array alike operators implemented
This commit is contained in:
parent
cd71a5705d
commit
ad0ea27c83
@ -51,6 +51,14 @@ class RedisClient
|
|||||||
raise "SELECT not allowed, use the :db option when creating the object"
|
raise "SELECT not allowed, use the :db option when creating the object"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def [](key)
|
||||||
|
get(key)
|
||||||
|
end
|
||||||
|
|
||||||
|
def []=(key,value)
|
||||||
|
set(key,value)
|
||||||
|
end
|
||||||
|
|
||||||
def read_reply
|
def read_reply
|
||||||
line = @sock.gets
|
line = @sock.gets
|
||||||
case line[0..0]
|
case line[0..0]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user