lib/liszt/redis_list.rb
# Remove existing list items and repopulate the list with the given ids
# (in the given order).
# @param [Array<Fixnum>] ids
# @return [Array<Fixnum>]
Remove existing list items and repopulate the list with the given ids
(in the given order).
Remove existing list items and repopulate the list with the given ids ( in the given order ) .
def clear_and_populate!(ids)
      redis.multi do
        clear
        ids.reverse.each { |id| unshift!(id) }
      end
      ids
    end
def clear_and_populate! ( ids ) redis . multi do clear ids . reverse . each { | id | unshift! ( id ) } end ids end
Remove existing list items and repopulate the list with the given ids
(in the given order).
Remove existing list items and repopulate the list with the given ids ( in the given order ) .
# reverse and unshift to avoid touching the marker
None
Array<Fixnum>
ids
<not_specific>
<not_specific>
None