Sha256: 8a2d0a135d2f715d35c8c641b66921cbef333b83e629d74890be762c1fc298c3

Contents?: true

Size: 651 Bytes

Versions: 1

Compression:

Stored size: 651 Bytes

Contents

require 'storable'

class Bone < Storable
  include Familia
  field :token
  field :name
  def id
    [token, name].join(':')
  end
  list   :owners
  set    :tags
  zset   :metrics
  hash   :props
  string :value, :default => "GREAT!"
end


class Session < Storable
  include Familia
  index :sessid
  field :sessid
  field :custid
  include Familia::Stamps
  ttl 60 # seconds to live
end


class Customer < Storable
  include Familia
  index :custid
  field :custid => Symbol
  field :name
  include Familia::Stamps
  # string :object, :class => self  # example of manual override
  class_list :customers, :suffix => []
  class_string :message
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
familia-0.6.0 lib/familia/test_helpers.rb