Sha256: f214edbcbf7f3c168322c9442259fa0078ca0d9d9d44c7505a97532dd90af0bd

Contents?: true

Size: 404 Bytes

Versions: 10

Compression:

Stored size: 404 Bytes

Contents

require 'pp'
require 'pathname'
require 'rubygems'
require 'adapter/redis'

root_path = Pathname(__FILE__).dirname.join('..').expand_path
lib_path  = root_path.join('lib')
$:.unshift(lib_path)
require 'toystore'

class User
  include Toy::Store
  store :redis, Redis.new

  attribute :name, String
end

user = User.create(:name => 'John')

pp user
pp User.get(user.id)

user.destroy

pp User.get(user.id)

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
toystore-0.8.3 examples/redis.rb
toystore-0.8.2 examples/redis.rb
toystore-0.8.1 examples/redis.rb
toystore-0.8.0 examples/redis.rb
toystore-0.7.0 examples/redis.rb
toystore-0.6.6 examples/redis.rb
toystore-0.6.5 examples/redis.rb
toystore-0.6.4 examples/redis.rb
toystore-0.6.3 examples/redis.rb
toystore-0.6.2 examples/redis.rb