0.0
No commit activity in last 3 years
No release in over 3 years
This gem allows for customization of which data to marshal, especially useful for selective session data serialization.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6.5
~> 0.9.0
~> 2.6.0
 Project Readme

thirty-thirty¶ ↑

the right hand of Marshall BraveStarr

Selectively marshal objects without the fancy ruby 1.9 marshalling:

class Marshalled
  extend Thirtythirty

  marshalled_accessor :attr1, :attr2
  attr_accessor :transient_attr
end

original = Marshalled.new
original.attr1 = "value1"
original.transient_attr = "non-marshalled"

marshalled = Marshal.dump(original)

reloaded = Marshal.load(marshalled)

reloaded.attr1          # => "value1"
reloaded.transient_attr # => nil

Note: Custom marshalling will only be activated by calling one of the marshalling methods (marshal, marshalled_reader, marshalled_writer, marshalled_accessor), not by extending Thirtythirty alone.