Sha256: 2fc2d6dc70a181e3bea42c66d11a898cb0c510cae2bb68be6e1039aef85004bd

Contents?: true

Size: 404 Bytes

Versions: 2

Compression:

Stored size: 404 Bytes

Contents

require 'pp'
require 'pathname'
require 'rubygems'
require 'adapter/memory'

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

class User
  include Toy::Store
  adapter :memory, {}

  attribute :name, String
end

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

pp user
pp User.read(user.id)

user.destroy

pp User.read(user.id)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
toystore-0.13.2 examples/memory.rb
toystore-0.13.1 examples/memory.rb