class Rebar::DSL::SortedSet

Attributes

connection[R]
key[R]

Public Class Methods

new(connection, key, &block) click to toggle source
# File lib/rebar/dsl/sorted_set.rb, line 4
def initialize(connection, key, &block)
  @connection = connection
  @key        = key
  instance_eval(&block) if block_given?
end

Public Instance Methods

members(count) click to toggle source
# File lib/rebar/dsl/sorted_set.rb, line 13
def members(count)
  count.times do
    connection.zadd(key, Rebar::Random.score, Rebar::Random.string)
  end
end