mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
RubyRedis info postprocessor rewritten in a more functional way
This commit is contained in:
parent
fc9aeaeaf8
commit
f5bf7e3e30
@ -31,8 +31,7 @@ class RedisClient
|
||||
"info" => lambda{|r|
|
||||
info = {}
|
||||
r.each_line {|kv|
|
||||
k,v = kv.split(':', 2)
|
||||
k,v = k.chomp, v = v.chomp
|
||||
k,v = kv.split(":",2).map{|x| x.chomp}
|
||||
info[k.to_sym] = v
|
||||
}
|
||||
info
|
||||
|
Loading…
Reference in New Issue
Block a user