Class: Redis::Attrs::List

Inherits:
Complex show all
Defined in:
lib/redis-attrs/list.rb

Instance Attribute Summary

Attributes inherited from Base

#klass, #name, #options, #type

Instance Method Summary collapse

Methods inherited from Complex

#initialize, redis_object_class

Methods inherited from Base

#initialize, #redis, #redis_key

Constructor Details

This class inherits a constructor from Redis::Attrs::Complex

Instance Method Details

#setter(id, list_object, new_list) ⇒ Object


4
5
6
7
# File 'lib/redis-attrs/list.rb', line 4

def setter(id, list_object, new_list)
  redis.del redis_key(id)
  new_list.each { |item| list_object << item }
end