Class: Lunar::UnsortedResultSet
Instance Attribute Summary
Attributes inherited from ResultSet
#key
Instance Method Summary
collapse
Methods inherited from ResultSet
#each, #initialize
Instance Method Details
#all(options = {}) ⇒ Object
32
33
34
35
36
37
|
# File 'lib/lunar/result_set.rb', line 32
def all(options = {})
start = Integer(options[:start] || 0)
limit = Integer(options[:limit] || 100)
Lunar.redis.sort(key, :limit => [start, limit]).map(&@block)
end
|
#size ⇒ Object
39
40
41
|
# File 'lib/lunar/result_set.rb', line 39
def size
Lunar.redis.scard(key)
end
|