Sha256: 773dab9295ce89467b9b18539136efc6389791759a90847ef91f7384fcff463d

Contents?: true

Size: 685 Bytes

Versions: 1

Compression:

Stored size: 685 Bytes

Contents

require 'familia'
require 'familia/test_helpers'

@a = Bone.new 'atoken', 'akey'

## Familia::Object::List#push
ret = @a.owners.push :value1
ret.class
#=> Familia::Object::List

## Familia::Object::List#<<
ret = @a.owners << :value2 << :value3 << :value4
ret.class
#=> Familia::Object::List

## Familia::Object::List#pop
@a.owners.pop
#=> 'value4'

## Familia::Object::List#first
@a.owners.first
#=> 'value1'

## Familia::Object::List#last
@a.owners.last
#=> 'value3'

## Familia::Object::List#to_a
@a.owners.to_a
#=> ['value1','value2','value3']

## Familia::Object::List#delete
@a.owners.delete 'value3'
#=> 1

## Familia::Object::List#size
@a.owners.size
#=> 2

@a.owners.destroy!

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
familia-0.6.0 try/23_redis_object_list_try.rb