class Kredis::Types::List
Attributes
typed[RW]
Public Instance Methods
append(*elements)
click to toggle source
# File lib/kredis/types/list.rb, line 19 def append(*elements) rpush types_to_strings(elements, typed) if elements.flatten.any? end
Also aliased as: <<
elements()
click to toggle source
# File lib/kredis/types/list.rb, line 6 def elements strings_to_types(lrange(0, -1) || [], typed) end
Also aliased as: to_a
prepend(*elements)
click to toggle source
# File lib/kredis/types/list.rb, line 15 def prepend(*elements) lpush types_to_strings(elements, typed) if elements.flatten.any? end
remove(*elements)
click to toggle source
# File lib/kredis/types/list.rb, line 11 def remove(*elements) types_to_strings(elements, typed).each { |element| lrem 0, element } end