Class: Redis::Attrs::FilteredSet
- Inherits:
-
Set
- Object
- Set
- Redis::Attrs::FilteredSet
- Defined in:
- lib/redis-attrs/objects_extensions.rb
Instance Method Summary collapse
Instance Method Details
#add(value) ⇒ Object
32 33 34 35 |
# File 'lib/redis-attrs/objects_extensions.rb', line 32 def add(value) value = [:filter].call(value) if [:filter] super end |
#delete(value) ⇒ Object
50 51 52 53 |
# File 'lib/redis-attrs/objects_extensions.rb', line 50 def delete(value) value = [:filter].call(value) if [:filter] super end |
#member?(value) ⇒ Boolean
45 46 47 48 |
# File 'lib/redis-attrs/objects_extensions.rb', line 45 def member?(value) value = [:filter].call(value) if [:filter] super end |
#merge(*values) ⇒ Object
37 38 39 40 41 42 43 |
# File 'lib/redis-attrs/objects_extensions.rb', line 37 def merge(*values) if [:filter] filter = [:filter] values = values.map { |value| filter.call(value) } end super end |