CompressedCookie
This gem provides a wrapper around key-based cookie accessors.
Installation
gem install
Examples
# define your cookie class
class MyCookie < CompressedCookie
compressor_keys :foo => 0,
:bar => 1
end
# use it to write to a raw cookie object
= []
MyCookie.write() do |writer|
writer.foo = 'hello world'
end
puts
# => ['hello world', nil]
# use it to read from a raw cookie object
MyCookie.read() do |reader|
puts reader.foo
# => 'hello world'
end
Development
`bundle install`
`bundle exec rspec spec`
License
Copyright 2011 Jens Bissinger. All rights reserved. MIT-LICENSE