Method: Chimera::RedisObjectProxy::ZSet#range
- Defined in:
- lib/chimera/redis_objects.rb
#range(start_index, end_index, extra_opts = {}) ⇒ Object
204 205 206 207 208 |
# File 'lib/chimera/redis_objects.rb', line 204 def range(start_index, end_index, extra_opts={}) opts = [self.key, start_index.to_i, end_index.to_i] opts << "WITHSCORES" if extra_opts[:with_scores] == true (connection.zrange(opts) || []).collect { |val| decode(val) } end |