Skip to content

Commit ef2eacb

Browse files
committed
refactor multi in Kredis::Types::Proxying
1 parent ddf555f commit ef2eacb

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/kredis/types/list.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class Kredis::Types::List < Kredis::Types::Proxying
2-
proxying :lrange, :lrem, :lpush, :rpush, :exists?, :del, :multi, :callnx
2+
proxying :lrange, :lrem, :lpush, :rpush, :exists?, :del, :callnx
33

44
attr_accessor :typed
55

lib/kredis/types/proxying.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ def init_default_in_multi(&block)
3333
if (default_value = default).blank?
3434
block.call
3535
else
36-
multi_results = multi do
36+
multi_results = proxy.multi do
3737
set_default(default_value)
3838
block.call
3939
end
40-
Array(multi_results)[-1] # convert to array in case in the middle of nested multi
40+
Array(multi_results)[-1]
4141
end
4242
end
4343

lib/kredis/types/scalar.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class Kredis::Types::Scalar < Kredis::Types::Proxying
2-
proxying :set, :get, :exists?, :del, :expire, :expireat, :multi
2+
proxying :set, :get, :exists?, :del, :expire, :expireat
33

44
attr_accessor :typed, :expires_in
55

0 commit comments

Comments
 (0)