Class: Rhoconnect::StoreOrm::SetProxy
Overview
Instance Method Summary
collapse
Methods inherited from FieldProxy
#initialize
Instance Method Details
#<<(v) ⇒ Object
Also known as:
add
326
327
328
|
# File 'lib/rhoconnect/store_orm.rb', line 326
def <<(v)
@store_db.sadd @name, @marshal.dump(v)
end
|
#delete(v) ⇒ Object
Also known as:
remove
331
332
333
|
# File 'lib/rhoconnect/store_orm.rb', line 331
def delete(v)
@store_db.srem @name, @marshal.dump(v)
end
|
#include?(v) ⇒ Boolean
Also known as:
has_key?, member?
336
337
338
|
# File 'lib/rhoconnect/store_orm.rb', line 336
def include?(v)
@store_db.sismember @name, @marshal.dump(v)
end
|
#members ⇒ Object
342
343
344
345
346
347
348
349
|
# File 'lib/rhoconnect/store_orm.rb', line 342
def members
members = @store_db.smembers(@name)
if members
members.map { |v| @marshal.load(v) }
else
[]
end
end
|