Class: ActiveRedis::DirtyObjects::SortedSet
- Defined in:
- lib/active_redis/dirty_objects/sorted_set.rb
Instance Attribute Summary collapse
-
#hash ⇒ Object
Returns the value of attribute hash.
-
#original ⇒ Object
readonly
Returns the value of attribute original.
Instance Method Summary collapse
Methods inherited from Array
Constructor Details
This class inherits a constructor from ActiveRedis::DirtyObjects::Array
Instance Attribute Details
#hash ⇒ Object
Returns the value of attribute hash.
4 5 6 |
# File 'lib/active_redis/dirty_objects/sorted_set.rb', line 4 def hash @hash end |
#original ⇒ Object (readonly)
Returns the value of attribute original.
5 6 7 |
# File 'lib/active_redis/dirty_objects/sorted_set.rb', line 5 def original @original end |
Instance Method Details
#[]=(score, value) ⇒ Object
7 8 9 10 11 |
# File 'lib/active_redis/dirty_objects/sorted_set.rb', line 7 def []=(score, value) self.push(score) @hash ||= {} @hash[value] = score end |
#changes ⇒ Object
13 14 15 |
# File 'lib/active_redis/dirty_objects/sorted_set.rb', line 13 def changes super.merge(hash: @hash) end |