Skip to content

Commit

Permalink
add output for debug
Browse files Browse the repository at this point in the history
  • Loading branch information
KunLiuDJI committed Jun 14, 2016
1 parent ecebffd commit 5b9de31
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/redis/objects/values.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ def mget(name, objects = [])
raise "Field name Error" if !redis_objects.keys.include?(name.to_sym)

keys = objects.map{ |obj| obj.redis_field_key name.to_sym }
p "---->redis"
p redis
p "---->keys"
p keys

self.redis.mget keys
end
Expand Down
1 change: 1 addition & 0 deletions spec/redis_objects_conn_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def id

obj.redis_value.value = 'foo'
obj.class.mget(:redis_value, []).should == []
p obj.redis_field_key :redis_value
obj.class.mget(:redis_value, [obj]).should == ['foo']

obj.redis_value.clear
Expand Down

0 comments on commit 5b9de31

Please sign in to comment.