class Garcon::Stash::Serializer::Default
Default
serializer which converts keys to strings and marshalls values.
@api public
Public Instance Methods
dump(value)
click to toggle source
Serialize a value.
@param [Object] value @return [String]
The value transformed to string.
# File lib/garcon/stash/serializer.rb, line 71 def dump(value) Marshal.dump(value) end
key_for(key)
click to toggle source
Transform the key to a string.
@param [Object] key @return [String]
The key transformed to string.
Calls superclass method
Garcon::Stash::Serializer::None#key_for
# File lib/garcon/stash/serializer.rb, line 62 def key_for(key) super(key.to_s) end
load(value)
click to toggle source
Parse a value.
@param [String] value @return [Object]
The deserialized value.
# File lib/garcon/stash/serializer.rb, line 80 def load(value) Marshal.load(value) end