Class: Garcon::Stash::Serializer::Default
- Defined in:
- lib/garcon/stash/serializer.rb
Overview
Default serializer which converts keys to strings and marshalls values.
Instance Method Summary collapse
-
#dump(value) ⇒ String
Serialize a value.
-
#key_for(key) ⇒ String
Transform the key to a string.
-
#load(value) ⇒ Object
Parse a value.
Instance Method Details
#dump(value) ⇒ String
Serialize a value.
71 72 73 |
# File 'lib/garcon/stash/serializer.rb', line 71 def dump(value) Marshal.dump(value) end |
#key_for(key) ⇒ String
Transform the key to a string.
62 63 64 |
# File 'lib/garcon/stash/serializer.rb', line 62 def key_for(key) super(key.to_s) end |
#load(value) ⇒ Object
Parse a value.
80 81 82 |
# File 'lib/garcon/stash/serializer.rb', line 80 def load(value) Marshal.load(value) end |