Class: Moxie::Store::Set

Inherits:
Moxie::Store show all
Defined in:
lib/moxie/store.rb

Instance Attribute Summary

Attributes inherited from Moxie::Store

#key

Instance Method Summary collapse

Methods inherited from Moxie::Store

#initialize, object, set

Constructor Details

This class inherits a constructor from Moxie::Store

Instance Method Details

#add(value) ⇒ Object



22
23
24
# File 'lib/moxie/store.rb', line 22

def add(value)
  Moxie.redis.sadd(key, value)
end

#remove(value) ⇒ Object



26
27
28
# File 'lib/moxie/store.rb', line 26

def remove(value)
  Moxie.redis.srem(key, value)
end

#to_aObject



18
19
20
# File 'lib/moxie/store.rb', line 18

def to_a
  Moxie.redis.smembers(key)
end