class Rebar::DSL::List

Attributes

connection[R]
key[R]

Public Class Methods

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

Public Instance Methods

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